An open API service indexing awesome lists of open source software.

https://github.com/hansalemaos/a_pandas_ex_inspect2df

Converts the output of some inspect functions to a DataFrame
https://github.com/hansalemaos/a_pandas_ex_inspect2df

dataframe inspect pandas

Last synced: about 1 month ago
JSON representation

Converts the output of some inspect functions to a DataFrame

Awesome Lists containing this project

README

          

# Converts the output of some inspect functions to a DataFrame

## pip install a-pandas-ex-inspect2df

```python
Convert the attributes of an object into a pandas DataFrame with information about each attribute.

Args:
obj: An object to inspect.

Returns:
A pandas DataFrame with the following columns:
- aa_attrb_name: The name of the attribute.
- aa_signature: The signature of the attribute.
- aa_attrb: The attribute itself.
- aa_doc: The docstring of the attribute.
- aa_annotations: The annotations of the attribute.
- aa_absfile: The absolute path of the file containing the attribute.
- aa_closurevars: The closure variables of the attribute.
- aa_unwrapped: The unwrapped attribute.

Raises:
None.
```

```python

from a_pandas_ex_inspect2df import inspect2df
import pandas as pd
print(inspect2df(pd)[:25].to_string(max_colwidth=30))
aa_attrb_name aa_signature aa_attrb aa_doc aa_annotations aa_absfile aa_closurevars aa_unwrapped
0 ArrowDtype (pyarrow_dtype: 'pa.DataTy...