Posts by Paulo C • 163 points
7 posts
-
3
votes3
answers1627
viewsA: Nested lists in python
First, your variable is i is being overwritten, should use another variable, besides you iterate again in the original list, when should iterate on var i only when it is a list. The second for…
-
2
votes3
answers7021
viewsA: How to change the type of a column in Pandas?
I did some tests and if it is informed 'int64' between quotes(string) and conversion occurs smoothly. cand_doacoes.CPF_CNPJ_doador.astype('int64')
-
1
votes1
answer832
viewsA: Calling Functions in Python 3
The structure blocks in python are made by indentation. So if you want to make a loop with the game function, must identar 4 spaces before your call. while pj <5 and pc <5: game() Also for the…
python-3.xanswered Paulo C 163 -
3
votes2
answers2450
viewsQ: Get range of values in pandas object. Dataframe
I have an object pandas. Dataframe with a python date field. How can I get a set of records according to date range? An example of the data set (last 10 records): datpre codneg nomres modref preabe…
-
2
votes3
answers1047
viewsA: Python Indentation Problems in Geany
geany uses tab by default in identation. Change Edit > Preferences > Editor > Indentation Tabs for Spaces. Python uses, by convention, 4 spaces for ident (Pycharm standard), and should not…
-
1
votes2
answers51
viewsA: passing parameters between activitys
String comparison in Java should be done by the method equals. if (cor.equals("verde")) { ... A link here from stackoverflow explaining: How to compare Strings in Java…
-
2
votes3
answers10708
viewsA: What is the main difference between a Tuple and a List?
Complementing the user response Maniero, as tuplas sane immutable, therefore it is not possible modify the content without overwriting the variable that represents it, while the list has several…