Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Returns the specified table as a DataFrame.
Syntax
table(tableName)
Parameters
| Parameter | Type | Description |
|---|---|---|
tableName |
str | The name of the table. |
Returns
DataFrame
Examples
df = spark.range(10)
df.createOrReplaceTempView('tblA')
spark.read.table('tblA').show()
# +---+
# | id|
# +---+
# | 0|
# | 1|
# | 2|
# | 3|
# | 4|
# | 5|
# | 6|
# | 7|
# | 8|
# | 9|
# +---+
spark.sql("DROP TABLE tblA")