Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read file xlsx and return a list

import pandas as pd

# Read file xlsx
excel_data = pd.read_excel('export.xlsx')
# Convert to dataframe and specific fields
df = pd.DataFrame(excel_data, columns=['PROVINCE', 'DISTRICT', 'PRECINCT', 'AREA_NAME'])
# Return a list
data = data.values.tolist()
 
PREVIOUS NEXT
Tagged: #python #read #file #xlsx #return #list
ADD COMMENT
Topic
Name
3+3 =