'how to use for loop to split dataframe (list in list) and assign new name

This is the data I am working with:

df = [[1,2,3], [2,3,4], [5,6,7]]

I want to make sure I get a new name for each df[1] and df[2] etc so that I can use it later in my codes.

I tried using the following code:

for i in range(len(df)):
    df_"{}".format(i) = df[i]

Obviously I am getting error for trying to declare dataframe like that.

How best can I achieve this? of splitting list in list into seperate dataframes using for loop?

Note: I am newbie to python hence if I missed anything obvious please help me point that out.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source