Skip to content

Commit

Permalink
Run pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonbb committed May 16, 2024
1 parent 9d9c057 commit c05b465
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions docs/tutorials/data_loading_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"# You can of course remove this and use your own directory and real files on your system.\n",
"with tempfile.TemporaryDirectory() as temp_path:\n",
" # Generates parquet files with random data within our temporary directorye.\n",
" generate_parquet_file(10, {\"nested1\" :100, \"nested2\": 10}, temp_path, file_per_layer=True)\n",
" \n",
" generate_parquet_file(10, {\"nested1\": 100, \"nested2\": 10}, temp_path, file_per_layer=True)\n",
"\n",
" # Read each individual parquet file into its own dataframe.\n",
" base_df = read_parquet(os.path.join(temp_path, \"base.parquet\"))\n",
" nested1 = read_parquet(os.path.join(temp_path, \"nested1.parquet\"))\n",
Expand All @@ -112,8 +112,7 @@
" \"nested1\": os.path.join(temp_path, \"nested1.parquet\"),\n",
" \"nested2\": os.path.join(temp_path, \"nested2.parquet\"),\n",
" },\n",
" )\n",
" "
" )"
]
},
{
Expand Down Expand Up @@ -209,8 +208,8 @@
"# You can of course remove this and use your own directory and real files on your system.\n",
"with tempfile.TemporaryDirectory() as temp_path:\n",
" nf.to_parquet(\n",
" temp_path, # The directory to save our output parquet files.\n",
" by_layer=True # Save each layer of the NestedFrame to its own parquet file.\n",
" temp_path, # The directory to save our output parquet files.\n",
" by_layer=True, # Save each layer of the NestedFrame to its own parquet file.\n",
" )\n",
"\n",
" # List the files in temp_path to ensure they were saved correctly.\n",
Expand All @@ -225,7 +224,7 @@
" },\n",
" )\n",
"\n",
"restored_nf # our dataframe is restored from our saved parquet files"
"restored_nf # our dataframe is restored from our saved parquet files"
]
},
{
Expand All @@ -252,8 +251,8 @@
"with tempfile.TemporaryDirectory() as temp_path:\n",
" output_path = os.path.join(temp_path, \"output.parquet\")\n",
" nf.to_parquet(\n",
" output_path, # The filename to save our NestedFrame to.\n",
" by_layer=False # Save the entire NestedFrame to a single parquet file.\n",
" output_path, # The filename to save our NestedFrame to.\n",
" by_layer=False, # Save the entire NestedFrame to a single parquet file.\n",
" )\n",
"\n",
" # List the files within our temp_path to ensure that we only saved a single parquet file.\n",
Expand All @@ -262,7 +261,7 @@
" # Read the NestedFrame back in from our saved single parquet file.\n",
" restored_nf_single_file = read_parquet(output_path)\n",
"\n",
"restored_nf_single_file # our dataframe is restored from a single saved parquet file"
"restored_nf_single_file # our dataframe is restored from a single saved parquet file"
]
}
],
Expand Down

0 comments on commit c05b465

Please sign in to comment.