Suppose you have the following data framework:
import pandas as pd import numpy as np df = pd.DataFrame(np.nan,columns=['A','B','C'],index=[0,1,2])
Suppose I need an extra βlayerβ on top of this pandas frame, so column A, row 0 will have its value, column B, row 0 will have a different value, column C of rows 0 will have something, column Row 1 and etc. So, like a dataframe on top of this existing one.
Can I add other layers? How to access these layers? Is this efficient, that is, should I just use a separate data frame? And could it be possible to save these several layers as csv, referring to separate layers ?, or is there a function that would split them into different worksheets in one book?
source share