phpsxg commented on issue #14763:
URL: https://github.com/apache/arrow/issues/14763#issuecomment-1333261670
I would also like to ask a question, does the index of df have to be
reset_index?
```
table = pa.Table.from_pandas(df)
ds.write_dataset(table,
file_path,
format='parquet',
schema=cls.schema,
# max_partitions=cls.partition_max_partitions,
max_rows_per_file=cls.partition_max_rows_per_file,
max_rows_per_group=cls.partition_max_rows_per_group,
existing_data_behavior='delete_matching',
partitioning=part
)
```
**error:**
```
pandas: '{"index_columns": ["__index_level_0__"], "column_indexes": [{"na' +
1025
which does not match expected schema
```
**print(df.index)**
```
Int64Index([ 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280,
1279,
...
12601, 12600, 12599, 12598, 12597, 12596, 12595, 12594, 12593,
974],
dtype='int64', length=12907)
```
--
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]