Skip to content

Commit

Permalink
Add support for pd.Index to_list()
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaLingWeng committed Oct 24, 2023
1 parent 9065623 commit defb839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion altair/utils/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ def to_dict(
}
)
kwds = {
k: v.to_list() if isinstance(v, pd.Series) else v
k: v.to_list() if isinstance(v, (pd.Series, pd.Index)) else v
for k, v in kwds.items()
if k not in list(ignore) + ["shorthand"]
}
Expand Down
2 changes: 1 addition & 1 deletion tools/schemapi/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ def to_dict(
}
)
kwds = {
k: v.to_list() if isinstance(v, pd.Series) else v
k: v.to_list() if isinstance(v, (pd.Series, pd.Index)) else v
for k, v in kwds.items()
if k not in list(ignore) + ["shorthand"]
}
Expand Down

0 comments on commit defb839

Please sign in to comment.