pyspark.pandas.read_table

pyspark.pandas.read_table(name: str, index_col: Union[str, List[str], None] = None) → pyspark.pandas.frame.DataFrame

Read a Spark table and return a DataFrame.

Parameters
namestring

Table name in Spark.

index_colstr or list of str, optional, default: None

Index column of table in Spark.

Returns
DataFrame

Examples

>>> ps.range(1).to_table('%s.my_table' % db)
>>> ps.read_table('%s.my_table' % db)
   id
0   0
>>> ps.range(1).to_table('%s.my_table' % db, index_col="index")
>>> ps.read_table('%s.my_table' % db, index_col="index")  
       id
index
0       0