79641343

Date: 2025-05-28 00:00:36
Score: 1
Natty:
Report link

When you set your new value to the loc, specifying the data type seems to satisfy that error message.

df.loc[df["Measure"] == metric.label, "source_data_url"] = str(metric.source_data_url)

For instance, if you want to set it equal to an empty value that is not None, you'll have to specify that it's a string first.

df.loc[df["Measure"] == metric.label, "source_data_url"] = str('')
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: William Duncan