Skip to content

Commit

Permalink
Add support for pandas 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 19, 2023
1 parent a8fafa6 commit 8ef0676
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion holonote/annotate/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ def _add_annotation_fields(self, index_value, fields=None):

new_fields = pd.DataFrame([dict(fields, **{self._field_df.index.name:index_value})])
new_fields = new_fields.set_index(self._field_df.index.name)
self._field_df = pd.concat((self._field_df, new_fields))
if self._field_df.empty:
self._field_df = new_fields
else:
self._field_df = pd.concat((self._field_df, new_fields))

def delete_annotation(self, index):
if index is None:
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
dependencies = ["holoviews", "pandas <2.1"]
dependencies = ["holoviews", "pandas"]

[tool.hatch.version]
source = "vcs"
Expand All @@ -35,11 +35,13 @@ scripts.update = "pre-commit autoupdate"
addopts = "-vv"
filterwarnings = [
"error",
# 2023-09: Ignore Bokeh UserWarning, which needs to be fixed in HoloViews
# 2023-09: Ignore Bokeh UserWarning, will be fixed in HoloViews 1.18
"ignore:found multiple competing values for:UserWarning:holoviews.plotting.bokeh.plot",
# 2023-09: Wrong warning, when a timedelta is compared to another scalar.
# Fixed in newer versions of Numpy: https://github.com/numpy/numpy/issues/10095
"ignore:elementwise comparison failed:DeprecationWarning:bokeh.core.property.bases",
# 2023-09: Ignore Pandas FutureWarning, will be fixed in HoloViews 1.18
"ignore:Series.__getitem__ treating keys:FutureWarning:holoviews.core.data.pandas",
]

[tool.ruff]
Expand Down

0 comments on commit 8ef0676

Please sign in to comment.