jorisvandenbossche commented on code in PR #51404:
URL: https://github.com/apache/arrow/pull/51404#discussion_r4141846914


##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -99,8 +99,8 @@ def _alltypes_example(size=100):
 
 def _check_pandas_roundtrip(df, expected=None, use_threads=False,
                             expected_schema=None,
-                            check_dtype=True, schema=None,
-                            preserve_index=False,
+                            check_dtype=True, check_freq=False,

Review Comment:
   Should this one be addressed?



##########
python/pyarrow/tests/test_dataset.py:
##########
@@ -240,7 +240,8 @@ def multisourcefs(request):
 
     # create one with schema partitioning by weekday and color
     mockfs.create_dir('schema')
-    for part, chunk in df_b.groupby([df_b.date.dt.dayofweek, df_b.color]):
+    for part, chunk in df_b.groupby([pd.DatetimeIndex(df_b.date).day_of_week,
+                                     df_b.color]):

Review Comment:
   ```suggestion
       for part, chunk in df_b.groupby(df_b.date.dt.day_of_week, df_b.color]):
   ```



##########
python/pyarrow/tests/test_compute.py:
##########
@@ -2644,8 +2644,8 @@ def _check_datetime_components(timestamps, timezone=None):
     year = ts.dt.year.astype("int64")
     month = ts.dt.month.astype("int64")
     day = ts.dt.day.astype("int64")
-    dayofweek = ts.dt.dayofweek.astype("int64")
-    dayofyear = ts.dt.dayofyear.astype("int64")
+    dayofweek = pd.DatetimeIndex(ts).day_of_week.astype("int64")
+    dayofyear = pd.DatetimeIndex(ts).day_of_year.astype("int64")

Review Comment:
   ```suggestion
       dayofweek = ts.dt.day_of_week.astype("int64")
       dayofyear = ts.dt.day_of_year.astype("int64")
   ```
   
   The deprecation message might have been confusing pointing to DatetimeIndex, 
but those new names are available just on Series `.dt` accessor as well



-- 
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]

Reply via email to