questdb / questdb/py-questdb-client
Pandas: Support `datetime64[ns]` dataframe index as designated timestamp.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 14
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 1
Description
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=Indexlogic if the index column is adatetime64, - or use
at=Serverlogic 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the buffer.dataframe entry point and read the current at=None and at=Server handling, then trace the Pandas index path. Done means at=Index uses a datetime64[ns] index, at=Server retains server timestamps, and at=None selects Index only for datetime64 indexes while retaining Server behavior for other index types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100