I'm trying to create a set of dataframes from one big dataframe. Theses dataframes consists of the columns of the original dataframe in this manner: 1st dataframe is the 1st column of the original one, 2nd dataframe is the 1st and 2nd columns of the original one, and so on. I use this code to iterate over the dataframe:
for i, data in enumerate(x):
data = x.iloc[:,:i]
print(data)
This works but I also get an empty dataframe in the beginning and an index vector I don't need. any suggestions on how to remove those 2?
thanks