C2_W2_LAB_1 error

At the end of notebook,when time series came in, lines 15 and 16, some errors happen and no temperature fixing is possible:

/home/jovyan/work/ungraded_lab_1/utils.py:330: 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
  data["Etmp (°C)"] = data["Etmp (°C)"].apply(
/home/jovyan/work/ungraded_lab_1/utils.py:333: 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
  data["Etmp (°C)"] = data["Etmp (°C)"].interpolate()
/home/jovyan/work/ungraded_lab_1/utils.py:335: 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
  data["Itmp (°C)"] = data["Itmp (°C)"].apply(
/home/jovyan/work/ungraded_lab_1/utils.py:338: 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
  data["Itmp (°C)"] = data["Itmp (°C)"].interpolate()

hi @tizianoct2000

is this ungraded lab?

also if you are trying to copy a dataframe, then the error log is mentioning to use

.loc[row_indexer, col_indexer] = value

Regards

DP

Hello,

yes it is in course AI for good -AI and climate change, week 2. I’m not trying to do anything, it is just an error thrown by the utils.py when executing some of its function , when the main program apparently call them. I don’t know if this erros would compromise any of the following labs in this course, the first effect is to deny the temperature fixing in this lab, so I signal them to anyone who could patch them.

1 Like

hi @tizianoct2000

Thank you for reporting this. i will inform the staff.

Regards

DP

Hi @tizianoct2000,

These are “warnings” (SettingWithCopyWarnings), not execution “errors”.

An error crashes the program; a warning is an advisory notice that the code is running but might produce unpredictable results.

In the context of this lab, these can be safely ignored.

Best,
Mubsi

1 Like