Skip to content

Pandas: Support datetime64[ns] dataframe index as designated timestamp. #35

@amunra

Description

@amunra

It's common to use a datetime64[ns] df.index in Pandas when dealing with timeseries.
In such case our API should just be:

buffer.dataframe(df, table_name="some_name")

This means changing the default logic of the at argument to also accept two new singleton types:

buffer.dataframe(df, ..., at=Server)  # timestamps are set by the server -- the current default.
buffer.dataframe(df, ..., at=Index)  # Use the index.

The new behaviour for the at=None default would be to:

  • Use at=Index logic if the index column is a datetime64,
  • or use at=Server logic if the index is any other type.

Whilst technically a breaking change, the feature change is minor and is very unlikely to affect any of our users, thus this feature will not require a new major software release number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions