I have a loop that creates data frames. Each of them need a unique name. The loop also creates unique strings, which are associated with the data frame. For example, in the below, the loop creates 10 unique strings and dataframes. How do I assign the string to the dataframe name, and make it so the dataframe is accessible outside of the function.
for i in range(10):
string = "name" + str(i)
df = pandas.DataFrame("some data")
#INSERT some code that changes df's name to "namei"
return namei
Thanks!