@@ -159,6 +159,55 @@ def size_qualifier(self) -> str:
159
159
size_qualifier = "+"
160
160
return size_qualifier
161
161
162
+ @abstractmethod
163
+ def to_buffer ():
164
+ """
165
+ Print a concise summary of a %(klass)s.
166
+
167
+ This method prints information about a %(klass)s including
168
+ the index dtype%(type_sub)s, non-null values and memory usage.
169
+
170
+ Parameters
171
+ ----------
172
+ data : %(klass)s
173
+ %(klass)s to print information about.
174
+ verbose : bool, optional
175
+ Whether to print the full summary. By default, the setting in
176
+ ``pandas.options.display.max_info_columns`` is followed.
177
+ buf : writable buffer, defaults to sys.stdout
178
+ Where to send the output. By default, the output is printed to
179
+ sys.stdout. Pass a writable buffer if you need to further process
180
+ the output.
181
+ %(max_cols_sub)s
182
+ memory_usage : bool, str, optional
183
+ Specifies whether total memory usage of the %(klass)s
184
+ elements (including the index) should be displayed. By default,
185
+ this follows the ``pandas.options.display.memory_usage`` setting.
186
+
187
+ True always show memory usage. False never shows memory usage.
188
+ A value of 'deep' is equivalent to "True with deep introspection".
189
+ Memory usage is shown in human-readable units (base-2
190
+ representation). Without deep introspection a memory estimation is
191
+ made based in column dtype and number of rows assuming values
192
+ consume the same memory amount for corresponding dtypes. With deep
193
+ memory introspection, a real memory usage calculation is performed
194
+ at the cost of computational resources.
195
+ %(null_counts_sub)s
196
+
197
+ Returns
198
+ -------
199
+ None
200
+ This method prints a summary of a %(klass)s and returns None.
201
+
202
+ See Also
203
+ --------
204
+ %(see_also_sub)s
205
+
206
+ Examples
207
+ --------
208
+ %(examples_sub)s
209
+ """
210
+
162
211
163
212
class DataFrameInfo (BaseInfo ):
164
213
"""
@@ -225,57 +274,6 @@ def to_buffer(
225
274
verbose : Optional [bool ],
226
275
show_counts : Optional [bool ],
227
276
) -> None :
228
- """
229
- Print a concise summary of a %(klass)s.
230
-
231
- This method prints information about a %(klass)s including
232
- the index dtype%(type_sub)s, non-null values and memory usage.
233
-
234
- Parameters
235
- ----------
236
- data : %(klass)s
237
- %(klass)s to print information about.
238
- verbose : bool, optional
239
- Whether to print the full summary. By default, the setting in
240
- ``pandas.options.display.max_info_columns`` is followed.
241
- buf : writable buffer, defaults to sys.stdout
242
- Where to send the output. By default, the output is printed to
243
- sys.stdout. Pass a writable buffer if you need to further process
244
- the output.
245
- %(max_cols_sub)s
246
- memory_usage : bool, str, optional
247
- Specifies whether total memory usage of the %(klass)s
248
- elements (including the index) should be displayed. By default,
249
- this follows the ``pandas.options.display.memory_usage`` setting.
250
-
251
- True always show memory usage. False never shows memory usage.
252
- A value of 'deep' is equivalent to "True with deep introspection".
253
- Memory usage is shown in human-readable units (base-2
254
- representation). Without deep introspection a memory estimation is
255
- made based in column dtype and number of rows assuming values
256
- consume the same memory amount for corresponding dtypes. With deep
257
- memory introspection, a real memory usage calculation is performed
258
- at the cost of computational resources.
259
- null_counts : bool, optional
260
- Whether to show the non-null counts. By default, this is shown
261
- only if the %(klass)s is smaller than
262
- ``pandas.options.display.max_info_rows`` and
263
- ``pandas.options.display.max_info_columns``. A value of True always
264
- shows the counts, and False never shows the counts.
265
-
266
- Returns
267
- -------
268
- None
269
- This method prints a summary of a %(klass)s and returns None.
270
-
271
- See Also
272
- --------
273
- %(see_also_sub)s
274
-
275
- Examples
276
- --------
277
- %(examples_sub)s
278
- """
279
277
printer = DataFrameInfoPrinter (
280
278
info = self ,
281
279
max_cols = max_cols ,
@@ -305,6 +303,8 @@ def to_buffer(
305
303
verbose : Optional [bool ],
306
304
show_counts : Optional [bool ],
307
305
) -> None :
306
+ """
307
+ """
308
308
printer = SeriesInfoPrinter (
309
309
info = self ,
310
310
verbose = verbose ,
0 commit comments