Open
Description
When I call resource.to_pandas()
on a resource that has a primaryKey defined that key is used as an index for the dataframe. This is a reasonable default behavior, but took me some time to realize/debug.
Possible Solutions
- Add an option for the
to_pandas
function ofindex=false
, (with a default of true) which follows a similar pattern to pandas to_csv function. - Add additional documentation on the to_pandas function. The only thing I could find online for this was here: https://framework.frictionlessdata.io/docs/formats/pandas.html
Adding additional documentation here that describes how primaryKey fields are used to index the dataframe would've cleared this up for me.
Current Workaround
Now that I know that to_pandas
works this way I can call df.reset_index()
[docs] to turn those index columns into regular columns, which is what I want in my situation.
Metadata
Metadata
Assignees
Labels
No labels