My code is wornking fine, but this messages shows in some commands and I can't figure it out.
df.loc[:,'Piso Salarial'] = df['Piso Salarial'].apply(lambda x: x.replace('.',''))
In this line I am trying to replace '.' for '' so I can convert strings to float on the next command. When I do this, a message is shown:
/tmp/ipykernel_287/2001347796.py:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df.loc[:,'Piso Salarial'] = df['Piso Salarial'].apply(lambda x: x.replace('.',''))
I tried to use .loc on the dataframe column with the apply. I tried using .copy()
But the message is still on