questdb / questdb/py-questdb-client

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

Open
#35 3 comments 0 reactions 0 assignees View on GitHub

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=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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.