https://365datascience.com/dwqa-answer/answer-for-why-it-showing-error-in18converting-float/ -
Hi Raj!
Thanks for reaching out!
Your code is per se correct. Therefore, what may be causing the issue is if at some point, previously in your notebook document, you have created a variable float containing an integer value. For example, you may have executed the following:
float = 99
If you’ve really done this, this means when executing float(99), Python is trying to call float and it doesn’t know what to do with the parentheses and the number between them afterwards.
To solve this problem, please restart your kernel (which you can do by selecting Kernel/Restart & Clear Output => Restart and Clear All Outputs), and retry running your code without assigning an integer (or any other value) to a variable called float.
Hope this helps.
Best,
Martin
#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy
No comments:
Post a Comment