Giving different names to df using a for loop

QuestionsGiving different names to df using a for loop
sethbeckerman5 Staff asked 4 years ago

I have a df in python with different cities.

I am trying to create a df for each city.
So wrote this code in python and it works. It does what I need. But i was wondering if there is any over way to create the name of each df in a different way rather than using

If I try this:

Give me this error:
Any tips/suggestions would be more than welcome!


View on Stack Overflow