Nov-28-2018, 07:42 PM
Hello,
I'm just starting out learning python and wanted to see if someone could help me out with loading my csv data.
I have the following information in a CSV file:
header row
column A - Date
Column B - Airport code
Column c - Passengers
Column D - Bookings
I'm not sure if the following code is correct:
# import CSV data
import pandas as pd
file = 'DESTINATION_DATA.csv'
data = pd.ExcelFile(file)
print(data.sheet_names)
['DEST_DATA']
df1 = data.parse('DEST_DATA')
df2 = data.parse(0)
Can someone help me with the import code and reading the data? Also explain how to load without using pandas.
Any help would be greatly appreciated.
Thanks,
Tim
I'm just starting out learning python and wanted to see if someone could help me out with loading my csv data.
I have the following information in a CSV file:
header row
column A - Date
Column B - Airport code
Column c - Passengers
Column D - Bookings
I'm not sure if the following code is correct:
# import CSV data
import pandas as pd
file = 'DESTINATION_DATA.csv'
data = pd.ExcelFile(file)
print(data.sheet_names)
['DEST_DATA']
df1 = data.parse('DEST_DATA')
df2 = data.parse(0)
Can someone help me with the import code and reading the data? Also explain how to load without using pandas.
Any help would be greatly appreciated.
Thanks,
Tim