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

Method test_ignore_metadata

python/pyarrow/tests/test_pandas.py:602–611  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

600 assert data_column['numpy_type'] == 'object'
601
602 def test_ignore_metadata(self):
603 df = pd.DataFrame({'a': [1, 2, 3], 'b': ['foo', 'bar', 'baz']},
604 index=['one', 'two', 'three'])
605 table = pa.Table.from_pandas(df)
606
607 result = table.to_pandas(ignore_metadata=True)
608 expected = (table.cast(table.schema.remove_metadata())
609 .to_pandas())
610
611 tm.assert_frame_equal(result, expected)
612
613 def test_list_metadata(self):
614 df = pd.DataFrame({'data': [[1], [2, 3, 4], [5] * 7]})

Callers

nothing calls this directly

Calls 1

castMethod · 0.45

Tested by

no test coverage detected