Salonijain27 commented on code in PR #12821:
URL: https://github.com/apache/arrow/pull/12821#discussion_r845932470
##########
python/pyarrow/feather.py:
##########
@@ -151,7 +151,17 @@ def write_feather(df, dest, compression=None,
compression_level=None,
df = df.to_dense()
if _pandas_api.is_data_frame(df):
- table = Table.from_pandas(df, preserve_index=False)
+ """
+ Feather v1 creates a new column in the resulting Table for
+ storing index.
+ """
+ if version == 1:
+ preserve_index = False
+
+ else:
+ preserve_index = True
Review Comment:
Thank you, I updated the code to set `preserve_index` to `None` if
`version==2` or if `version==1` and df index type is `RangeIndex`
--
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]