I have a dictionary which looks like this:
dic = {'shop_2': date shop_id item_id item_price
0 2013-05-12 2 20949 5.0
1 2013-05-13 2 20949 5.0
2 2013-05-17 2 20949 5.0
3 2013-05-19 2 20949 5.0
4 2013-05-21 2 20949 5.0
[568 rows x 7 columns],
'shop_3': date shop_id item_id item_price
0 2013-04-24 59 20949 5.0
1 2013-04-26 59 20949 5.0
2 2013-04-27 59 20949 5.0
3 2013-04-28 59 20949 5.0
4 2013-04-29 59 20949 5.0
[760 rows x 7 columns]}
What I'm trying to do is to create a loop yn Python to split the dictionary by its keys into new dataframes. For example, the dataframe shop_2 must have the values of key: shop_2 from the dictionary, the dataframe shop_3 must have the values of key: shop_3 from the dictionary. If I try to access to the keys of the dictionary it already looks like a df but what I need is a loop to create new dataframe for each one of the keys from the dictionary.