python如何读取csv文件中的某一张表,如何使用python从单个csv文件中的多个工作表读取数据...

I am using python and i had a csv file with data in multiple sheets.

So we can read data from csv file using python as below

Suppose the data in data.csv file in sheet1 is below

what | are | you | doing | however

hello | that | would | be | useful

csv_file = "/home/user/csv_folder/data.csv"

for line in open(csv_file,'r'):

print line

..........

..........

The output for the above will be as below

"what are you doing however"

"hello that would be useful"

but in the same data.csv file, i had data in another sheet2 as below

This | will | be | second | sheet | data

That | would | lot | useful | now

Now what i am trying to do is to print the data which is present in another sheets(more than 1 sheets if present in a single csv file).

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值