Posts by Fr0St • 15 points
7 posts
-
1
votes2
answers263
viewsA: In Python, search a string from the information of a column?
CONTAINS You could use the CONTAINS method which is similar to the LIKE of SQL. df = df[df['nome'].str.contains('INVESTIMENTOS', na = False)] In this case the exit would be that the DF would now…
-
0
votes2
answers77
viewsA: Split columns without Pandas tab
Using what the honourable Member said above, we can also simplify and put another way to exclude these unwanted numbers, IN >>> import pandas as pd >>> df = pd.DataFrame({"col":…
-
-1
votes3
answers568
viewsA: Memoryerror on the pandas
Is your Python version x32? If so, this may be the problem. The system cannot allocate enough memory for the variables. I would recommend using the x64 version which is the most efficient for data…
-
-2
votes2
answers47
viewsA: The date of a sale changes when the record of the sale is updated
Ever tried to change the assignment of the TIMESTAMP field when creating the table? Could you test by putting the CURRENT_TIMESTAMP or the DEFAULT NOW() Follow an example: CREATE TABLE TBL_VENDA (…
-
0
votes3
answers7021
viewsA: How to change the type of a column in Pandas?
You can use several types, I usually use the: All-purpose df.NOME_DA_COLUNA = pd.to_numeric(df.NOME_DA_COLUNA , errors='coerce') To format Date in String import datetime from datetime import date…
-
0
votes1
answer222
viewsA: Pandas package not recognized in notebook jupyter
I believe you should perform the following command on your terminal. pip install pandas Remember that after performing this Pip procedure, you should put at the beginning of your code: import pandas…
-
1
votes2
answers670
viewsA: Python - Path indication of a file for reading
You can also use an "r" at the beginning of a path, more or less like this: workbook = xlrd.open_workbook(r"C:\\Users\rdmsouza\Documents\python\programas\dados.xls") Then you will realize that every…