Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

How do I cut a Pandas dataframe at a certain value in a certain column?

$
0
0

I have data from an experiment from t=0 to t=500s, but I would like to only plot the first 100s of data. How do I "slice" or cut the dataframe so I can plot my interval in matplotlib? Thank you!

used the following

x = df.loc[df['ElapsedTime'] == 100]

thought it would work, except it ran into a x and y must have same first dimension, but have shapes (973088,) and (0, 5)


Viewing all articles
Browse latest Browse all 13921

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>