Posts by Antonio • 57 points
8 posts
-
0
votes1
answer1702
viewsQ: How to copy a specific data frame line to another data frame
I have following Data Frame: data = { 'País': ['Bélgica', 'Índia', 'Brasil','Índia','Bélgica','Bélgica','Russia','Brasil'], 'Capital': ['Bruxelas1', 'Nova Delhi', 'Brasília', 'Nova…
-
0
votes2
answers5844
viewsA: Python/Pandas - How to create a data frame that contains the original line and duplicate line
Searching for the duplicated command, it has the Keep parameter Keep - last marks only the second as duplicate (default) = first mark only the first = False marks both Then to create the dataframe…
-
1
votes1
answer1465
viewsQ: Python/Pandas - How to compare if column content of the data frame, in date format, is equal to another date column about 1 day?
I have a date frame with two columns in date format and I need to compare if one of them is between the interval of one day more or less than another column. For example: Column A = 2015-03-02…
-
0
votes1
answer1686
viewsQ: Python/Pandas - How to remove extra space between two words from a data frame column
The "strip" function removes the spaces on the left and right, but does not remove the spaces between the words: raw_data = {'NAME': [' José Luiz da Silva ']} df = pd.DataFrame(raw_data, columns =…
-
0
votes1
answer4239
viewsQ: How to remove special character and string column point from a data frame?
raw_data = {'NAME': ['José L. da Silva', 'Ricardo Proença', 'Antônio de Morais']} df = pd.DataFrame(raw_data, columns = ['NAME']) How to transform the names of the NAME column into: Jose L da Silva…
-
3
votes2
answers1079
viewsQ: How to compare if the contents of two columns string of a data frame are similar
I have a data frame where I need to compare how much the contents of two columns are similar. For example: coluna a = “José Luiz da Silva” and coluna b = “José L. Silva”. How can I indicate that…
-
1
votes2
answers5844
viewsQ: Python/Pandas - How to create a data frame that contains the original line and duplicate line
In a date frame that contains two lines with Pais = India, I was able to create a duplicity-free data frame with only one line from India A data frame with duplicate line only I need to create a…
-
-1
votes1
answer4942
viewsQ: Python/Pandas - How to create a "str" column from another numeric, including zero on the left when the value is less than 9
The code I used to create the column is returning with the following error: The Truth value of a Series is ambiguous. Use a.Empty, a.bool(), a. item(), a.any() or a.all(). I don’t know how to fix…