Data
Reads from a csv or xlsx file and stores the result in a dataframe. This is commonly the first step done in a data processing pipeline. For an xlsx file, you can specify which sheet to load as a dataframe.
Options
name: The name of the csv file that you want to load into the script
sheet:
columns: Manually specify columns name, useful when the data has no headers
combineIntoSingleDataFrame: Used with xlsx files, combines all sheets into a single dataframe
separateBySpace: Specifies that a csv file is delimited by space, not commas
Examples
Example 1 - Load Data from CSV File
Most workflows begin by loading data from an external source such as a CSV file. This example demonstrates loading a CSV file into a pandas dataframe so it can be used in analysis or transformations. The resulting dataframe becomes the foundation for subsequent operations, such as column calculations or visualizations.
#> Data Pizzerias.csv
AFLEFT
pizzeriasDf = pd.read_csv('Pizzerias.csv') AFRIGHT