def test_to_pandas(): df = get_complete_df() df.to_arrow() df.to_pandas() # test shifted df df.shift(2).to_pandas() df = DataFrame({"col": Series([True, False, True])}) print(df) df.shift(2).to_pandas()
def test_to_pandas(): df = DataFrame({ "bools": [False, True, False], "bools_nulls": [None, True, False], "int": [1, 2, 3], "int_nulls": [1, None, 3], "floats": [1.0, 2.0, 3.0], "floats_nulls": [1.0, None, 3.0], "strings": ["foo", "bar", "ham"], "strings_nulls": ["foo", None, "ham"], }) df.to_arrow() df.to_pandas() # test shifted df df.shift(2).to_pandas() df = DataFrame({"col": Series([True, False, True])}) print(df) df.shift(2).to_pandas()
def test_shift(): df = DataFrame({"A": ["a", "b", "c"], "B": [1, 3, 5]}) a = df.shift(1) b = DataFrame({"A": [None, "a", "b"], "B": [None, 1, 3]}, nullable=True) assert a.frame_equal(b, null_equal=True)