您当前的位置: 首页 >  Python

Better Bench

暂无认证

  • 1浏览

    0关注

    695博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【Python】解决tqdm ‘module‘ object is not callable

Better Bench 发布时间:2021-07-21 16:25:41 ,浏览量:1

问题

tqdm是显示数据处理进度条 使用import tqdm报错 ‘module’ object is not callable

import tqdm
datafields = [("text", TEXT), ("label", LABEL)]
train_examples= []
for text, label in tqdm(zip(train['text'], train['label'])):
    train_examples.append(data.Example.fromlist([text, label], datafields))
train_data = data.Dataset(train_examples, datafields)


解决

import使用方法不对,应该使用from tqdm import tqdm

from tqdm import tqdm
常用例子
from tqdm import tqdm
tqdm.pandas()
def clear(s):
	return s.strip()
df.progress_apply(clear)
关注
打赏
1665674626
查看更多评论
立即登录/注册

微信扫码登录

0.0438s