Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] could not convert string to float #3225

Open
zhangyuqi-1 opened this issue Aug 16, 2022 · 2 comments
Open

[BUG] could not convert string to float #3225

zhangyuqi-1 opened this issue Aug 16, 2022 · 2 comments

Comments

@zhangyuqi-1
Copy link

py3.7
pyodps[mars]==0.11

df = md.DataFrame(mt.random.rand(100000000, 4), columns=list('abcd'))
print(df.sum().execute())

{ValueError}could not convert string to float: '\r\n\r\n\r\n\n\n\n\n \n \n \n <title>淘宝网 - 淘!我喜欢</title>\n \n \n <meta name="description"\n content="淘宝网 - 亚洲较大的网上交易平台,提供各类服饰、美容、家居、数码、话费/点卡充值… 数亿优质商品,同时提供担保交易(先收货后付款)等安全交易保障服务,并由商家提供退货承诺、破损补寄等消费者保障服务,让你安心享受网上购物乐趣!" />\n <meta name="keyword"\n content="淘宝,掏宝,网上购物,C2C,在线交易,交易市场,网上交易,交易市场,网上买,网上卖,购物网站,团购,网上贸易,安全购物,电子商务,放心买,供应,买卖信息,网店,一口价,拍卖,网上开店,网络购物,打折,免费开店,网购,频道,店铺" />\n \n \n <script\n src="//g.alicdn.com/??kissy/k/1.4.16/seed-min.js,kg/kmd-adapter/0.1.5/index.js,k...

@zhangyuqi-1 zhangyuqi-1 changed the title [BUG] [BUG] could not convert string to float Aug 16, 2022
@SurajS0925
Copy link

The Python "ValueError: could not convert string to float" occurs when we pass a string that contains characters or an empty string to the float() class.

To solve the error, remove all unnecessary characters from the string before calling float().

@BhargavGurav
Copy link

Looks like error is not in above code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants