0

Good morning, I'm doing this code but it doesn't work.

Good morning, I'm doing this code but it doesn't work, what happens is that I want the user to enter 250 data and then use the data.plot function to show me the graph. Could you correct my mistake data=pd.DataFrame(np.random.randn(list(map(float(input().split(',')))) data.plot

3rd Nov 2020, 2:27 PM
Astrid
Astrid - avatar
6 Respostas
+ 2
I don't think you can plot in sololearn
3rd Nov 2020, 2:48 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
+ 1
Quantity of ( must be equal to Quantity of ) add one more ) you have 7 "(" and 5 ")"!!!! check again
3rd Nov 2020, 2:37 PM
Shadoff
Shadoff - avatar
0
the amount is 250 data that the user enters and that would be shown in a graph.
3rd Nov 2020, 2:42 PM
Astrid
Astrid - avatar
0
- Map has 2 parameters, a function (float) and a list (input...) - No need to call list - No need for random numbers (also randn expects int, you feed it a list) - Your dataframe has a single column, better use series import pandas as pd data=pd.Series(map(float,input().split(','))) print(data)
3rd Nov 2020, 2:44 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
I use jupyter notebook
3rd Nov 2020, 2:50 PM
Astrid
Astrid - avatar
0
Two more notes: - You have asked same question before. Please try to stick to one thread - You surely don't want to enter 250 values every time. You should read them from a file
3rd Nov 2020, 3:00 PM
Benjamin Jürgens
Benjamin Jürgens - avatar