What am I doing wrong??

Seth (Semy) Poniewaz 0 Reputation points
2025-06-17T15:47:57.5166667+00:00

I'm following along in a "Train and Evaluate Clustering Models" module, and on the first Exercise I'm unable to run in VS Code
I've never encountered any issue following along in VS.

I can print dataset as seen in the first box of code, but in the second box I receive an error " ValueError: could not convert string to float: '15.26,14.84,0.871,5.763,3.312,2.221,5.22,0' "

This question is related to the following Learning Module

Community Center | Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep M 9,775 Reputation points Microsoft External Staff Volunteer Moderator
    2025-06-18T04:24:55.1166667+00:00

    Hi Seth (Semy) Poniewaz

    Thank you for reaching out to Microsoft Q & A forum.     

    The error you're encountering is likely due to the CSV file being space separated rather than comma separated. To resolve this, please modify your code as follows:

    data = pd.read_csv('seeds.csv', delim_whitespace=True)
    
    

     This should allow the data to load correctly, and the remaining steps in your exercise should work as expected.  

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.