[英]How can I copy columns from one excel sheet to another with python using openpyxl Library?
[英]How can I check values of an excel sheet using Python?
我有一張 Excel 表,其中包含股票價格數據,我想構建一個代碼來檢查猜測是否正確。 所以我需要將我的 python 值與 Excel 表上的值進行比較。
我曾嘗試在.csv
文件中使用repl.it
,但它不兼容,我無法檢查我的值。 我也嘗試在repl.it
上使用.xlsx
文件,但我仍然無法訪問這些值。
有什么方法可以比較這些值嗎?
嘗試這個:
import pandas as pd
table = pd.read_excel('file_name.xslx')
for row in table.values.tolist():
first_value_in_row = row[0]
second_value_in_row = row[1]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.