Python define problem

0 votes
Hi this is my coding so far, and yes I'm very new to this:

import pandas as pd

data= pd.read_csv("/Users/mattiaslindell/Desktop/Idea/Cancer AI/cancer.csv")
print(data)

x = dataset.drop(columns=["diagnosis(1=m, 0=b)"])

y = dataset["diagnosis(1=m, 0=b)"]

However I get this error message and do not know how to fix it:

NameError: name 'dataset' is not defined
Nov 30, 2021 in Python by Mattias

edited Mar 4, 2025 291 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP