File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
org.knime.python3.arrow.tests/src/test/python/unittest Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,20 @@ def test_to_from_pandas(self):
307307 with self .assertRaises (RuntimeError ):
308308 self .generate_test_table_with_rowid_column ().to_pandas ()
309309
310+ def test_pandas_roundtrip_with_data (self ):
311+ """
312+ This test works up to Py 3.11 and Pandas <2, but fails with
313+ Py 3.12 and Pandas 2.1
314+ """
315+ table = self ._test_table
316+ data = table .to_pandas ()
317+ # if we omit the 2 columns below, the roundtrip works also in Py3.12
318+ # data.drop(["TimestampCol", "URICol"], axis=1, inplace=True)
319+ other = kt .Table .from_pandas (data )
320+ data2 = other .to_pandas ()
321+
322+ pd .testing .assert_frame_equal (data , data2 )
323+
310324 def test_to_batches (self ):
311325 table = self ._test_table
312326 batches = list (table .to_batches ())
You can’t perform that action at this time.
0 commit comments