MCPcopy
hub / github.com/pandas-dev/pandas / info

Method info

pandas/core/frame.py:3813–3973  ·  view source on GitHub ↗

Print a concise summary of a DataFrame. This method prints information about a DataFrame including the index dtype and columns, non-NA values and memory usage. Parameters ---------- verbose : bool, optional Whether to print the full summ

(
        self,
        verbose: bool | None = None,
        buf: WriteBuffer[str] | None = None,
        max_cols: int | None = None,
        memory_usage: bool | str | None = None,
        show_counts: bool | None = None,
    )

Source from the content-addressed store, hash-verified

3811
3812 # ----------------------------------------------------------------------
3813 def info(
3814 self,
3815 verbose: bool | None = None,
3816 buf: WriteBuffer[str] | None = None,
3817 max_cols: int | None = None,
3818 memory_usage: bool | str | None = None,
3819 show_counts: bool | None = None,
3820 ) -> None:
3821 """
3822 Print a concise summary of a DataFrame.
3823
3824 This method prints information about a DataFrame including
3825 the index dtype and columns, non-NA values and memory usage.
3826
3827 Parameters
3828 ----------
3829 verbose : bool, optional
3830 Whether to print the full summary. By default, the setting in
3831 ``pandas.options.display.max_info_columns`` is followed.
3832 buf : writable buffer, defaults to sys.stdout
3833 Where to send the output. By default, the output is printed to
3834 sys.stdout. Pass a writable buffer if you need to further process
3835 the output.
3836 max_cols : int, optional
3837 When to switch from the verbose to the truncated output. If the
3838 DataFrame has more than `max_cols` columns, the truncated output
3839 is used. By default, the setting in
3840 ``pandas.options.display.max_info_columns`` is used.
3841 memory_usage : bool, str, optional
3842 Specifies whether total memory usage of the DataFrame
3843 elements (including the index) should be displayed. By default,
3844 this follows the ``pandas.options.display.memory_usage`` setting.
3845
3846 True always show memory usage. False never shows memory usage.
3847 A value of 'deep' is equivalent to "True with deep introspection".
3848 Memory usage is shown in human-readable units (base-2
3849 representation). Without deep introspection a memory estimation is
3850 made based in column dtype and number of rows assuming values
3851 consume the same memory amount for corresponding dtypes. With deep
3852 memory introspection, a real memory usage calculation is performed
3853 at the cost of computational resources. See the
3854 :ref:`Frequently Asked Questions <df-memory-usage>` for more
3855 details.
3856 show_counts : bool, optional
3857 Whether to show the non-null counts. By default, this is shown
3858 only if the DataFrame is smaller than
3859 ``pandas.options.display.max_info_rows`` and
3860 ``pandas.options.display.max_info_columns``. A value of True always
3861 shows the counts, and False never shows the counts.
3862
3863 Returns
3864 -------
3865 None
3866 This method prints a summary of a DataFrame and returns None.
3867
3868 See Also
3869 --------
3870 DataFrame.describe: Generate descriptive statistics of DataFrame

Calls 2

renderMethod · 0.95
DataFrameInfoClass · 0.90