MCPcopy Create free account
hub / github.com/apache/arrow / test_to_pandas_empty_table

Function test_to_pandas_empty_table

python/pyarrow/tests/test_table.py:411–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

409
410@pytest.mark.pandas
411def test_to_pandas_empty_table():
412 # https://issues.apache.org/jira/browse/ARROW-15370
413 import pandas as pd
414 import pandas.testing as tm
415
416 df = pd.DataFrame({'a': [1, 2], 'b': [0.1, 0.2]})
417 table = pa.table(df)
418 result = table.schema.empty_table().to_pandas()
419 assert result.shape == (0, 2)
420 tm.assert_frame_equal(result, df.iloc[:0])
421
422
423@pytest.mark.pandas

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected