Saturday 15 May 2010

indexing - Pandas Dataframe reindexing issue -



indexing - Pandas Dataframe reindexing issue -

i have df looks this:

value objectid ab798 54.68 ab799 45.98 ab800 38.79 etc.. etc..

where "value" accesible column "objectid" isn't, it's if df has been indexed "objectid". want have objectid column header value , able access of rows (ab798, ab799, etc...) calling pd.objectid.

you can reset index

df.reset_index()

or, can access index:

df.index.values

pandas indexing dataframes

No comments:

Post a Comment