I have a pandas series series. If I want to get the element-wise floor or ceiling, is there a built in method or do I have to write the function and use apply?
series
You can use NumPy's built in methods to do this: np.ceil(series) or np.floor(series).
np.ceil(series)
np.floor(series)
Both return a Series object (not an array) so the index information is preserved.