This is an automated email from the ASF dual-hosted git repository.

jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 35667adc8a GH-49933: [Python] Fix test_table_column_subset_metadata to 
set freq on correct object (#49944)
35667adc8a is described below

commit 35667adc8ab4cfcbce28bdbe538bc0cf37521be2
Author: AnkitAhlawat <[email protected]>
AuthorDate: Thu May 7 14:37:16 2026 +0530

    GH-49933: [Python] Fix test_table_column_subset_metadata to set freq on 
correct object (#49944)
---
 python/pyarrow/tests/test_pandas.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/pyarrow/tests/test_pandas.py 
b/python/pyarrow/tests/test_pandas.py
index 063532140c..090c55065e 100644
--- a/python/pyarrow/tests/test_pandas.py
+++ b/python/pyarrow/tests/test_pandas.py
@@ -638,8 +638,8 @@ class TestConvertMetadata:
             table_subset = table.remove_column(1)
             result = table_subset.to_pandas()
             expected = df[['a']]
-            if isinstance(df.index, pd.DatetimeIndex):
-                df.index.freq = None
+            if isinstance(expected.index, pd.DatetimeIndex):
+                expected.index.freq = None
             tm.assert_frame_equal(result, expected)
 
             table_subset2 = table_subset.remove_column(1)

Reply via email to