Posts by totally_grey • 36 points
3 posts
-
1
votes2
answers48
viewsA: Return rows from a dataframe that are not in another dataframe
You can use the following code: base_dados2 = base_dados[["Id","Fruta"]].where(base_dados["Id"]=="01").dropna() In short: the dataframe base_dados2 receives the columns "Id" and "Fruit" of the…
-
0
votes1
answer47
viewsA: How to use a variable of an X function in a Y function in Python?
I made some changes based on what you commented, to have access to the value that a function handles the best way is to make this function return this value, I made its function delta_res return the…
-
1
votes1
answer53
viewsA: How to get back inside the while
You can turn while into a function so you can call it whenever you want without having to copy and paste the same code in several places, I updated your code based on what I understood from your…