Numpy's isnan() can generate the result as Series class of pandas, although numpy does not have dependency on pandas and Numpy's API reference does not explain this as below. Could anyone please tell me the mechanism of this? Unfortunately, I could not find isnan()'s definition in Numpy's source codes.
Example
isnan()'s API Reference Wrote:Returns: y : ndarray or bool
True where x is NaN, false otherwise. This is a scalar if x is a scalar.
Example
1 2 |
s = pd.Series([ 0 ]) print ( type (np.isnan(s))) |
Output:<class 'pandas.core.series.Series'>