• To create a DataFrame to hold the data from a file in a stage, use the read property to get a DataFrameReader object. In the DataFrameReader object, call the method corresponding to the format of the data in the file:
# Create DataFrames from data in a stage.
df_json = session.read.json("@my_stage2/data1.json")
• To create a DataFrame to hold the results of a SQL query, call the sql method:
# Create a DataFrame from a SQL query
df_sql = session.sql("SELECT name from sample_product_data")
• To create a DataFrame from data in a table, view, or stream, call the table method:
# Create a DataFrame from the data in the "sample_product_data" table.
df_table = session.table("sample_product_data")
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
aba2s
2 months, 1 week agorbeam
7 months, 4 weeks agostopthisnow
1 year ago