I want to read a .xlsx file using the Pandas Library of python and port the data to a postgreSQL table.
All I could do up until now is:
im
from pandas import read_excel
# find your sheet name at the bottom left of your excel file and assign
# it to my_sheet
my_sheet = 'Sheet1' # change it to your sheet name
file_name = 'products_and_categories.xlsx' # change it to the name of your excel file
df = read_excel(file_name, sheet_name = my_sheet)
print(df.head()) # shows headers with top 5 rows