databricks.koalas.
read_parquet
Load a parquet object from the file path, returning a DataFrame.
File path
If not None, only these columns will be read from the file.
Index column of table in Spark.
All other options passed directly into Spark’s data source.
See also
DataFrame.to_parquet, DataFrame.read_table, DataFrame.read_delta, DataFrame.read_spark_io
DataFrame.to_parquet
DataFrame.read_table
DataFrame.read_delta
DataFrame.read_spark_io
Examples
>>> ks.range(1).to_parquet('%s/read_spark_io/data.parquet' % path) >>> ks.read_parquet('%s/read_spark_io/data.parquet' % path, columns=['id']) id 0 0
You can preserve the index in the roundtrip as below.
>>> ks.range(1).to_parquet('%s/read_spark_io/data.parquet' % path, index_col="index") >>> ks.read_parquet('%s/read_spark_io/data.parquet' % path, columns=['id'], index_col="index") ... id index 0 0