[英]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.