We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8276725 commit 1251f44Copy full SHA for 1251f44
datafusion/tests/test_dataframe.py
@@ -533,3 +533,14 @@ def test_cache(df):
533
def test_count(df):
534
# Get number of rows
535
assert df.count() == 3
536
+
537
538
+def test_to_pandas(df):
539
+ # Skip test if pandas is not installed
540
+ pd = pytest.importorskip("pandas")
541
542
+ # Convert datafusion dataframe to pandas dataframe
543
+ pandas_df = df.to_pandas()
544
+ assert type(pandas_df) == pd.DataFrame
545
+ assert pandas_df.shape == (3, 3)
546
+ assert set(pandas_df.columns) == {"a", "b", "c"}
0 commit comments