Skip to content

Commit

Permalink
fix: fix Pandas deprecation warning in unit tests, closes #705
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Sep 4, 2023
1 parent a9c7d90 commit f0287f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/igraph/io/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ def _construct_graph_from_dataframe(

if use_vids:
if (
str(edges.dtypes[0]).startswith(("int", "Int"))
and str(edges.dtypes[1]).startswith(("int", "Int"))
str(edges.dtypes.iloc[0]).startswith(("int", "Int"))
and str(edges.dtypes.iloc[1]).startswith(("int", "Int"))
):
# Check pandas nullable integer data type:
# https://pandas.pydata.org/docs/user_guide/integer_na.html
Expand Down

0 comments on commit f0287f5

Please sign in to comment.