We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78abe62 commit 76df310Copy full SHA for 76df310
pandas/tests/frame/test_sorting.py
@@ -735,3 +735,26 @@ def test_sort_index_na_position_with_categories_raises(self):
735
736
with pytest.raises(ValueError):
737
df.sort_values(by="c", ascending=False, na_position="bad_position")
738
+
739
+ def test_sort_multicolumn_uint64(self):
740
+ # GH9918
741
+ # uint64 multicolumn sort
742
743
+ df = pd.DataFrame(
744
+ {
745
+ "a": pd.Series([18446637057563306014, 1162265347240853609]),
746
+ "b": pd.Series([1, 2]),
747
+ }
748
+ )
749
+ df["a"] = df["a"].astype(np.uint64)
750
+ result = df.sort_values(["a", "b"])
751
752
+ expected = pd.DataFrame(
753
754
755
756
+ },
757
+ index=pd.Index([1, 0]),
758
759
760
+ tm.assert_frame_equal(result, expected)
0 commit comments