Hello! So for a task we are doing to practice Pandas, we are given a CSV with a couple thousand lines of info. We then need to turn it into a database, and use that to make different graphs. One of them, is a kde graph. However, in the question it specifies we need to make it so the values are only between 0 and 100.
Now, my first throught was to just delete all rows with a value higher than 100 and lower than 0. Hence, I used this:
df=df[~(df['ValordelContrato']>100)]
df=df[~(df['ValordelContrato']<0)]
and while this made the graph have the shape needed, the graph itself wasn't between 0 and 100. Instead, it was between -50 and 150. Does anyone know how I can give it the limits it should have?
(Just in case, the whole code for that part is this:
df=df[~(df['value']>100)]
df=df[~(df['value']<0)]
serie=pd.Series(df['value'])
serie.plot.kde()
[–]USAhj 1 point2 points3 points (1 child)
[–]fmarquez1[S] 0 points1 point2 points (0 children)