Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: stop using deprecated pandas reindex_axis #280

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions gneiss/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,13 @@ def test_biom_match(self):
exp_df = pd.DataFrame(exp_table.to_dataframe())
res_df = pd.DataFrame(res_table.to_dataframe())

exp_df = exp_df.reindex_axis(sorted(exp_df.columns), axis=1)
res_df = res_df.reindex_axis(sorted(res_df.columns), axis=1)
exp_df = exp_df.reindex(sorted(exp_df.columns), axis=1)
res_df = res_df.reindex(sorted(res_df.columns), axis=1)

pdt.assert_frame_equal(exp_df, res_df)

exp_md = exp_md.reindex_axis(sorted(exp_md.index), axis=0)
res_md = res_md.reindex_axis(sorted(res_md.index), axis=0)
exp_md = exp_md.reindex(sorted(exp_md.index), axis=0)
res_md = res_md.reindex(sorted(res_md.index), axis=0)

pdt.assert_frame_equal(res_md, exp_md)

Expand Down
2 changes: 1 addition & 1 deletion gneiss/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def _dense_match_tips(table, tree):
_tree.bifurcate()
_tree.prune()
sorted_features = [n.name for n in _tree.tips()]
_table = _table.reindex_axis(sorted_features, axis=1)
_table = _table.reindex(sorted_features, axis=1)
return _table, _tree


Expand Down