python extract Excel data

Import module pandas

import pandas as pd

# Fill in the path to the Excel data file to be read
data = pd.read_excel('C:\\Users\\Administrator\\Desktop\\No. 900 Jiangyue Road temperature test data 20221107.xls') # Brackets File path in
first_column = data.iloc[0:, 0] # The first 0 represents the first row of numbers, the second 0 represents the first column of numbers
first_column_list = first_column.tolist() # Convert Excel table data into a list

print(first_column_list)

Guess you like

Origin blog.csdn.net/m0_68870101/article/details/131642972