@@ -184,12 +184,6 @@ class MergeError(ValueError):
184
184
"""
185
185
186
186
187
- class AccessorRegistrationWarning (Warning ):
188
- """
189
- Warning for attribute conflicts in accessor registration.
190
- """
191
-
192
-
193
187
class AbstractMethodError (NotImplementedError ):
194
188
"""
195
189
Raise this error instead of NotImplementedError for abstract methods.
@@ -281,6 +275,13 @@ class DataError(Exception):
281
275
282
276
For example, calling ``ohlc`` on a non-numerical column or a function
283
277
on a rolling window.
278
+
279
+ Examples
280
+ --------
281
+ >>> ser = pd.Series(['a', 'b', 'c'])
282
+ >>> ser.rolling(2).sum()
283
+ Traceback (most recent call last):
284
+ DataError: No numeric types to aggregate
284
285
"""
285
286
286
287
@@ -552,6 +553,17 @@ class AttributeConflictWarning(Warning):
552
553
Occurs when attempting to append an index with a different
553
554
name than the existing index on an HDFStore or attempting to append an index with a
554
555
different frequency than the existing index on an HDFStore.
556
+
557
+ Examples
558
+ --------
559
+ >>> idx1 = pd.Index(['a', 'b'], name='name1')
560
+ >>> df1 = pd.DataFrame([[1, 2], [3, 4]], index=idx1)
561
+ >>> df1.to_hdf('file', 'data', 'w', append=True) # doctest: +SKIP
562
+ >>> idx2 = pd.Index(['c', 'd'], name='name2')
563
+ >>> df2 = pd.DataFrame([[5, 6], [7, 8]], index=idx2)
564
+ >>> df2.to_hdf('file', 'data', 'a', append=True) # doctest: +SKIP
565
+ AttributeConflictWarning: the [index_name] attribute of the existing index is
566
+ [name1] which conflicts with the new [name2]...
555
567
"""
556
568
557
569
@@ -644,7 +656,6 @@ class InvalidComparison(Exception):
644
656
645
657
__all__ = [
646
658
"AbstractMethodError" ,
647
- "AccessorRegistrationWarning" ,
648
659
"AttributeConflictWarning" ,
649
660
"CategoricalConversionWarning" ,
650
661
"ClosedFileError" ,
0 commit comments