Aug-30-2019, 09:08 AM
Or you can try call .loc correctly:
>>> import pandas as pd >>> df = pd.DataFrame({'chars': (*'abc',), 'nums': (*range(3),)}) >>> df chars nums 0 a 0 1 b 1 2 c 2 pandas.core.frame.DataFrame >>> type(df.loc[0]) <class 'pandas.core.series.Series'> >>> type(df.loc[[0]]) # note additional brackets <class 'pandas.core.frame.DataFrame'>This and some other examples available in pandas documenation: pandas.DataFrame.loc
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.