Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions notebooks/0_start_here.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
"source": [
"## Reading Data from Snowflake\n",
"Today, we'll be analyzing the time series data from the [Cybersyn Finance and Economics dataset](https://app.snowflake.com/marketplace/listing/GZTSZAS2KF7/cybersyn-inc-financial-economic-essentials). You can find the instructions to setup the dataset for this tutorial [here](https://quickstarts.snowflake.com/guide/getting_started_with_pandas_on_snowflake/#1). \n",
"Today, we'll be analyzing the time series data from the [Snowflake Public Data (Free)](https://app.snowflake.com/marketplace/listing/GZTSZ290BV255/snowflake-public-data-products-snowflake-public-data-free?search=snowflake+public+data+). You can find the instructions to setup the dataset for this tutorial [here](https://quickstarts.snowflake.com/guide/getting_started_with_pandas_on_snowflake/#1). \n",
"\n",
"Let's start by reading the `stock_price_timeseries` table into a DataFrame!\n",
"\n",
Expand Down Expand Up @@ -122,7 +122,7 @@
"\n",
"1) Create a [Snowpark DataFrame](https://docs.snowflake.com/en/developer-guide/snowpark/python/working-with-dataframes#return-the-contents-of-a-dataframe-as-a-pandas-dataframe) and calling [`to_pandas`](https://docs.snowflake.com/developer-guide/snowpark/reference/python/latest/snowpark/api/snowflake.snowpark.DataFrame.to_pandas) to export results into a pandas DataFrame\n",
"```python\n",
"snowpark_df = session.table(\"FINANCIAL__ECONOMIC_ESSENTIALS.CYBERSYN.STOCK_PRICE_TIMESERIES\")\n",
"snowpark_df = session.table(\"SNOWFLAKE_PUBLIC_DATA_FREE.PUBLIC_DATA_FREE.STOCK_PRICE_TIMESERIES\")\n",
"native_pd_df = snowpark_df.to_pandas()\n",
"```\n",
"\n",
Expand All @@ -132,7 +132,7 @@
"# Create a cursor object\n",
"cur = session.connection.cursor()\n",
"# Execute a statement that will generate a result set\n",
"cur.execute(\"select * from FINANCIAL__ECONOMIC_ESSENTIALS.CYBERSYN.STOCK_PRICE_TIMESERIES\")\n",
"cur.execute(\"select * from SNOWFLAKE_PUBLIC_DATA_FREE.PUBLIC_DATA_FREE.STOCK_PRICE_TIMESERIES\")\n",
"# Fetch all the rows in a cursor and load them into a pandas DataFrame\n",
"native_pd_df = cur.fetch_pandas_all()\n",
"```\n",
Expand All @@ -155,7 +155,7 @@
"source": [
"start = perf_counter()\n",
"cur = session.connection.cursor()\n",
"cur.execute(\"select * from FINANCIAL__ECONOMIC_ESSENTIALS.CYBERSYN.STOCK_PRICE_TIMESERIES\")\n",
"cur.execute(\"select * from SNOWFLAKE_PUBLIC_DATA_FREE.PUBLIC_DATA_FREE.STOCK_PRICE_TIMESERIES\")\n",
"native_pd_df = cur.fetch_pandas_all()\n",
"end = perf_counter()\n",
"print(f\"Native pandas took {end - start} seconds to read the data!\")"
Expand Down