You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/15 08:00:28 UTC

[GitHub] [arrow] milesgranger commented on a diff in pull request #14631: ARROW-18173: [Python] Drop older versions of Pandas (<1.0)

milesgranger commented on code in PR #14631:
URL: https://github.com/apache/arrow/pull/14631#discussion_r1022444719


##########
python/pyarrow/tests/test_compute.py:
##########
@@ -1794,13 +1794,9 @@ def test_strptime():
 @pytest.mark.skipif(sys.platform == 'win32',
                     reason="Timezone database is not available on Windows yet")
 def test_strftime():
-    from pyarrow.vendored.version import Version
 
     def _fix_timestamp(s):
-        if Version(pd.__version__) < Version("1.0.0"):
-            return s.to_series().replace("NaT", pd.NaT)
-        else:
-            return s
+        return s

Review Comment:
   Maybe we ought to remove the calls to this function? I count 7, all in this file.



##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -1071,13 +1071,12 @@ def test_python_datetime_with_timezone_tzinfo(self):
         pytz = pytest.importorskip("pytz")
         from datetime import timezone
 
-        if Version(pd.__version__) > Version("0.25.0"):
-            # older pandas versions fail on datetime.timezone.utc (as in input)
-            # vs pytz.UTC (as in result)
-            values = [datetime(2018, 1, 1, 12, 23, 45, tzinfo=timezone.utc)]
-            # also test with index to ensure both paths roundtrip (ARROW-9962)
-            df = pd.DataFrame({'datetime': values}, index=values)
-            _check_pandas_roundtrip(df, preserve_index=True)
+        # older pandas versions fail on datetime.timezone.utc (as in input)
+        # vs pytz.UTC (as in result)

Review Comment:
   nit: Seems like this comment can also go, or rephrased, or the test can go if it was specific to pre-1.0.0 pandas?



##########
python/pyarrow/tests/test_compute.py:
##########
@@ -2023,30 +2013,29 @@ def test_assume_timezone():
     timezone = "Europe/Brussels"
 
     # nonexistent parameter was introduced in Pandas 0.24.0

Review Comment:
   nit: can the comment go since we only care about >=1.0.0 'things' now?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org