I have a data frame:
score created_at
0 0.00 2021-04-04 08:28:08
1 0.25 2021-04-04 08:18:03
2 -0.20 2021-04-04 08:09:54
3 0.15 2021-04-03 06:08:55
4 0.19 2021-04-03 06:08:55
I want to set the format of the column create_at to datetime by using:
df['created_at']=pd.to_datetime(df['created_at'])
but I get the copy warning below:
C:\Anaconda\lib\site-packages\ipykernel\__main__.py:30: 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
Can I use in_place=True
somewhere? How do I fix so the warning message goes away?