AlenkaF commented on code in PR #12704:
URL: https://github.com/apache/arrow/pull/12704#discussion_r841517758
##########
python/pyarrow/parquet.py:
##########
@@ -225,6 +225,64 @@ class ParquetFile:
in nanoseconds.
decryption_properties : FileDecryptionProperties, default None
File decryption properties for Parquet Modular Encryption.
+
+ Examples
+ --------
+
+ Generate an example PyArrow Table and write it to Parquet file:
+
+ >>> import pandas as pd
+ >>> import pyarrow as pa
+ >>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],
+ ... 'month': [3, 5, 7, 9, 11, 12],
+ ... 'day': [1, 5, 9, 13, 17, 23],
+ ... 'n_legs': [2, 2, 4, 4, 5, 100],
+ ... 'animal': ["Flamingo", "Parrot", "Dog", "Horse",
+ ... "Brittle stars", "Centipede"]})
+ >>> table = pa.Table.from_pandas(df)
Review Comment:
Yes, agree with this. Will correct it in all applicable examples.
--
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]