[英]unable to read csv data using python pandas
使用這個打印我得到這個 output
print(price_data['sellingPrice'])
#0 500
#1 300
#Name: sellingPrice, dtype: int64
print(price_data['orders'])
#0 1000
#1 12
#Name: orders, dtype: int64
sale_value= (((price_data['sellingPrice']) * (price_data['orders'])))
#0 500000
#1 3600
#dtype: int64 sale_value
有什么辦法可以像這樣得到 output
第一排 csv
price_data['sellingPrice']=500
price_data['orders']=100
sale_value=500000
price_data['sale_value']=price_data['sellingPrice'] * price_data['orders']
然后就用這個: -
price_data.loc[0,['sellingPrice','orders','sale_value']]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.