[英]Extracting numeric data from Excel column and convert into to array of strings in Python
I have data in excel sheet which is arranged like this :我在excel表中有数据,排列如下:
I want to write a python code in Spyder to extract the 2nd column of this data in this form :我想在 Spyder 中编写一个 python 代码,以这种形式提取此数据的第二列:
data1 = ["66","55","33","22"]
数据 1 = ["66","55","33","22"]
How can I do this?我怎样才能做到这一点? I am doing this using xlrd.我正在使用 xlrd 执行此操作。
假设存储您的工作表的变量是“工作表”,您可以执行以下操作:
second_col_data_arr = sheet.col_values(1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.