I have pandas DataFrame which I have composed from concat. One row consists of 96 values, I would like to split the DataFrame from the value 72.
pandas
concat
I generally use array split because it's easier simple syntax and scales better with more than 2 partitions.
import numpy as np partitions = 2 dfs = np.array_split(df, partitions)
np.split(df, [100,200,300], axis=0] wants explicit index numbers which may or may not be desirable.
np.split(df, [100,200,300], axis=0]