mwouts / itables

Pandas DataFrames as Interactive DataTables
https://mwouts.github.io/itables/
MIT License
765 stars 56 forks source link

Add the datetime extension #289

Closed mwouts closed 3 weeks ago

mwouts commented 3 months ago

Will close #288

github-actions[bot] commented 3 months ago

Thank you for making this pull request.

Did you know? You can try it on Binder: Binder:lab.

Also, the version of ITables developed in this PR can be installed with pip:

pip install git+https://github.com/mwouts/itables.git@add_datetime_extension

(this requires nodejs, see more at Developing ITables)

mwouts commented 3 months ago

Testing locally with this code almost works, e.g. we can display and filter the table

from itables import show, init_notebook_mode

init_notebook_mode(all_interactive=True)

show(pd.DataFrame({'date':pd.date_range("2022-01-01", "2024-12-31")}), buttons=["searchBuilder"])

@AllanJard do I need to do something special to get rid of the YYYY before the date?

image

mwouts commented 3 weeks ago

@AllanJard do I need to do something special to get rid of the YYYY before the date?

The problem is gone now with datatables.net-datetime==1.5.3, thank you Allan!

AllanJard commented 3 weeks ago

AWesome - good to hear :)

codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.88%. Comparing base (014d22e) to head (47847ae). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #289 +/- ## ======================================= Coverage 95.88% 95.88% ======================================= Files 27 27 Lines 1191 1191 ======================================= Hits 1142 1142 Misses 49 49 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.