jorisvandenbossche commented on code in PR #14631:
URL: https://github.com/apache/arrow/pull/14631#discussion_r1022896395
##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -1071,13 +1071,9 @@ 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)
+ values = [datetime(2018, 1, 1, 12, 23, 45, tzinfo=timezone.utc)]
+ df = pd.DataFrame({'datetime': values}, index=values)
Review Comment:
```suggestion
# also test with index to ensure both paths roundtrip (ARROW-9962)
df = pd.DataFrame({'datetime': values}, index=values)
```
(sorry, that line of comment could be kept ;))
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]