Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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
6 Respostas
+ 2
I don't think you can plot in sololearn
+ 1
Quantity of ( must be equal to
Quantity of )
add one more )
you have 7 "(" and 5 ")"!!!!
check again
0
the amount is 250 data that the user enters and that would be shown in a graph.
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)
0
I use jupyter notebook
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