0

The first code project of machine learning

Hi I tried many times to answer the code project and I think my code is correct but I couldn't get the 50 XP. Can anyone tell me what is the problem of my code? My code: filename = input('https://sololearn.com/uploads/files/one.csv') column_name = input('a') import pandas as pd import numpy as np df= pd.read_csv(filename) print (df[column_name].values)

11th Dec 2021, 6:06 AM
Zahra Azimzadehirani
1 Respuesta
+ 1
import pandas as pd filename = 'https://sololearn.com/uploads/files/one.csv' column_name = 'a' df = pd.read_csv(filename) print(df[column_name].values) You should change your first rows. They should be: filename = 'https://sololearn.com/uploads/files/one.csv' column_name = 'a' You need input() only if you want to set variable from terminal. For example I can use: a = 1 b = 2 print(a + b) # Output will be 3 Or I can use input() a = int(input()) b = int(input()) print(a + b) # After run code it will ask to input two numbers and then give output So, you don't need inputs if you know what data will be in these variables. Hope I solved your problem)
11th Dec 2021, 1:07 PM
RaiRoko
RaiRoko - avatar