Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: python get screen size raspberry pi 
Python :: Dictionary convert 2 lists into a dictionary, use zip() 
Python :: def factorial python 
Python :: django jinja else if template tags 
Python :: how to get mac address in python 
Python :: python undefined 
Python :: random letters generator python 
Python :: flatmap in python 
Python :: python round without math 
Python :: input function python 
Python :: highlight null/nan values in pandas table 
Python :: python includes string 
Python :: python 2.7 venv 
Python :: batch gradient descent python 
Python :: change month name in python 
Python :: get key from value dictionary py 
Python :: python datetime minus datetime 
Python :: numpy array divide each row by its sum 
Python :: create new list with for loop python 
Python :: python - join two columns and transform it as index 
Python :: compress excel file in python 
Python :: get number in string python 
Python :: format dictionary python 
Python :: streamlit sidebar width 
Python :: Character limit python system 
Python :: python redirect with button click 
Python :: django url with string parameter 
Python :: python min value index from an array 
Python :: how to make a comment in python 
Python :: tables in python 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =