Re: [Numpy-discussion] [SciPy-User] Why slicing Pandas column and then subtract gives NaN?

2019-02-14 Thread Mike C
Thanks a lot, Thomas. I don’t have index when I read in the data. I just want to slice two series to the same length, and subtract. That’s it! I also don’t what numpy methods wrapped within methods. They work, but hard do understand. How would you do it? In Matlab or R, it’s very simple, one l

Re: [Numpy-discussion] [SciPy-User] Why slicing Pandas column and then subtract gives NaN?

2019-02-15 Thread Mike C
The original data was in CSV format. I read it in using pd.read_csv(). It does have column names, but no row names. I don’t think numpy reads csv files. And also, when I do a[2:5]-b[:3], it does not throw any “index out of range” error. I was able to catch that, but in both Matlab and R. You get