pandas.errors.DataError#
- exception pandas.errors.DataError[source]#
在对非数值数据执行操作时引发的异常。
例如,在非数值列上调用
ohlc或在滚动窗口上调用函数。另请参阅
Series.rolling为 Series 对象提供滚动窗口计算。
DataFrame.rolling为 DataFrame 对象提供滚动窗口计算。
示例
>>> ser = pd.Series(["a", "b", "c"]) >>> ser.rolling(2).sum() Traceback (most recent call last): DataError: No numeric types to aggregate