neulab/docprompting-conala huggingface dataset:
pandas.plotting.radviz   pandas.plotting.radviz(frame, class_column, ax=None, color=None, colormap=None, **kwds)[source]
 
Plot a multidimensional dataset in 2D. Each Series in the DataFrame is represented as a evenly distributed slice on a circle. Each data point is rendered in the circle according to the value on each Series. Highly correlated Series in the DataFrame are placed closer on the unit circle. RadViz allow to project a N-dimensional data set into a 2D space where the influence of each dimension can be interpreted as a balance between the influence of all dimensions. More info available at the original article describing RadViz.  Parameters 
 
frame:DataFrame


Object holding the data.  
class_column:str


Column name containing the name of the data point category.  
ax:matplotlib.axes.Axes, optional


A plot instance to which to add the information.  
color:list[str] or tuple[str], optional


Assign a color to each category. Example: [‘blue’, ‘green’].  
colormap:str or matplotlib.colors.Colormap, default None


Colormap to select colors from. If string, load colormap with that name from matplotlib.  **kwds

Options to pass to matplotlib scatter plotting method.    Returns 
 class:matplotlib.axes.Axes

    See also  plotting.andrews_curves

Plot clustering visualization.    Examples 
>>> df = pd.DataFrame(
...     {
...         'SepalLength': [6.5, 7.7, 5.1, 5.8, 7.6, 5.0, 5.4, 4.6, 6.7, 4.6],
...         'SepalWidth': [3.0, 3.8, 3.8, 2.7, 3.0, 2.3, 3.0, 3.2, 3.3, 3.6],
...         'PetalLength': [5.5, 6.7, 1.9, 5.1, 6.6, 3.3, 4.5, 1.4, 5.7, 1.0],
...         'PetalWidth': [1.8, 2.2, 0.4, 1.9, 2.1, 1.0, 1.5, 0.2, 2.1, 0.2],
...         'Category': [
...             'virginica',
...             'virginica',
...             'setosa',
...             'virginica',
...             'virginica',
...             'versicolor',
...             'versicolor',
...             'setosa',
...             'virginica',
...             'setosa'
...         ]
...     }
... )
>>> pd.plotting.radviz(df, 'Category')
<AxesSubplot:xlabel='y(t)', ylabel='y(t + 1)'>
pandas.plotting.register_matplotlib_converters   pandas.plotting.register_matplotlib_converters()[source]
 
Register pandas formatters and converters with matplotlib. This function modifies the global matplotlib.units.registry dictionary. pandas adds custom converters for  pd.Timestamp pd.Period np.datetime64 datetime.datetime datetime.date datetime.time   See also  deregister_matplotlib_converters

Remove pandas formatters and converters.
pandas.plotting.scatter_matrix   pandas.plotting.scatter_matrix(frame, alpha=0.5, figsize=None, ax=None, grid=False, diagonal='hist', marker='.', density_kwds=None, hist_kwds=None, range_padding=0.05, **kwargs)[source]
 
Draw a matrix of scatter plots.  Parameters 
 
frame:DataFrame


alpha:float, optional


Amount of transparency applied.  
figsize:(float,float), optional


A tuple (width, height) in inches.  
ax:Matplotlib axis object, optional


grid:bool, optional


Setting this to True will show the grid.  
diagonal:{‘hist’, ‘kde’}


Pick between ‘kde’ and ‘hist’ for either Kernel Density Estimation or Histogram plot in the diagonal.  
marker:str, optional


Matplotlib marker type, default ‘.’.  
density_kwds:keywords


Keyword arguments to be passed to kernel density estimate plot.  
hist_kwds:keywords


Keyword arguments to be passed to hist function.  
range_padding:float, default 0.05


Relative extension of axis range in x and y with respect to (x_max - x_min) or (y_max - y_min).  **kwargs

Keyword arguments to be passed to scatter function.    Returns 
 numpy.ndarray

A matrix of scatter plots.     Examples 
>>> df = pd.DataFrame(np.random.randn(1000, 4), columns=['A','B','C','D'])
>>> pd.plotting.scatter_matrix(df, alpha=0.2)
array([[<AxesSubplot:xlabel='A', ylabel='A'>,
    <AxesSubplot:xlabel='B', ylabel='A'>,
    <AxesSubplot:xlabel='C', ylabel='A'>,
    <AxesSubplot:xlabel='D', ylabel='A'>],
   [<AxesSubplot:xlabel='A', ylabel='B'>,
    <AxesSubplot:xlabel='B', ylabel='B'>,
    <AxesSubplot:xlabel='C', ylabel='B'>,
    <AxesSubplot:xlabel='D', ylabel='B'>],
   [<AxesSubplot:xlabel='A', ylabel='C'>,
    <AxesSubplot:xlabel='B', ylabel='C'>,
    <AxesSubplot:xlabel='C', ylabel='C'>,
    <AxesSubplot:xlabel='D', ylabel='C'>],
   [<AxesSubplot:xlabel='A', ylabel='D'>,
    <AxesSubplot:xlabel='B', ylabel='D'>,
    <AxesSubplot:xlabel='C', ylabel='D'>,
    <AxesSubplot:xlabel='D', ylabel='D'>]], dtype=object)
pandas.plotting.table   pandas.plotting.table(ax, data, rowLabels=None, colLabels=None, **kwargs)[source]
 
Helper function to convert DataFrame and Series to matplotlib.table.  Parameters 
 
ax:Matplotlib axes object


data:DataFrame or Series


Data for table contents.  **kwargs

Keyword arguments to be passed to matplotlib.table.table. If rowLabels or colLabels is not specified, data index or column name will be used.    Returns 
 matplotlib table object
pandas.qcut   pandas.qcut(x, q, labels=None, retbins=False, precision=3, duplicates='raise')[source]
 
Quantile-based discretization function. Discretize variable into equal-sized buckets based on rank or based on sample quantiles. For example 1000 values for 10 quantiles would produce a Categorical object indicating quantile membership for each data point.  Parameters 
 
x:1d ndarray or Series


q:int or list-like of float


Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles.  
labels:array or False, default None


Used as labels for the resulting bins. Must be of the same length as the resulting bins. If False, return only integer indicators of the bins. If True, raises an error.  
retbins:bool, optional


Whether to return the (bins, labels) or not. Can be useful if bins is given as a scalar.  
precision:int, optional


The precision at which to store and display the bins labels.  
duplicates:{default ‘raise’, ‘drop’}, optional


If bin edges are not unique, raise ValueError or drop non-uniques.    Returns 
 
out:Categorical or Series or array of integers if labels is False


The return type (Categorical or Series) depends on the input: a Series of type category if input is a Series else Categorical. Bins are represented as categories when categorical data is returned.  
bins:ndarray of floats


Returned only if retbins is True.     Notes Out of bounds values will be NA in the resulting Categorical object Examples 
>>> pd.qcut(range(5), 4)
... 
[(-0.001, 1.0], (-0.001, 1.0], (1.0, 2.0], (2.0, 3.0], (3.0, 4.0]]
Categories (4, interval[float64, right]): [(-0.001, 1.0] < (1.0, 2.0] ...
  
>>> pd.qcut(range(5), 3, labels=["good", "medium", "bad"])
... 
[good, good, medium, bad, bad]
Categories (3, object): [good < medium < bad]
  
>>> pd.qcut(range(5), 4, labels=False)
array([0, 0, 1, 2, 3])
pandas.RangeIndex   classpandas.RangeIndex(start=None, stop=None, step=None, dtype=None, copy=False, name=None)[source]
 
Immutable Index implementing a monotonic integer range. RangeIndex is a memory-saving special case of Int64Index limited to representing monotonic ranges. Using RangeIndex may in some instances improve computing speed. This is the default index type used by DataFrame and Series when no explicit index is provided by the user.  Parameters 
 
start:int (default: 0), range, or other RangeIndex instance


If int and “stop” is not given, interpreted as “stop” instead.  
stop:int (default: 0)


step:int (default: 1)


dtype:np.int64


Unused, accepted for homogeneity with other index types.  
copy:bool, default False


Unused, accepted for homogeneity with other index types.  
name:object, optional


Name to be stored in the index.      See also  Index

The base pandas Index type.  Int64Index

Index of int64 data.    Attributes       
start The value of the start parameter (0 if this was not supplied).  
stop The value of the stop parameter.  
step The value of the step parameter (1 if this was not supplied).    Methods       
from_range(data[, name, dtype]) Create RangeIndex from a range object.
pandas.RangeIndex.from_range   classmethodRangeIndex.from_range(data, name=None, dtype=None)[source]
 
Create RangeIndex from a range object.  Returns 
 RangeIndex
pandas.RangeIndex.start   propertyRangeIndex.start
 
The value of the start parameter (0 if this was not supplied).
pandas.RangeIndex.step   propertyRangeIndex.step
 
The value of the step parameter (1 if this was not supplied).
pandas.RangeIndex.stop   propertyRangeIndex.stop
 
The value of the stop parameter.
pandas.read_clipboard   pandas.read_clipboard(sep='\\s+', **kwargs)[source]
 
Read text from clipboard and pass to read_csv.  Parameters 
 
sep:str, default ‘s+’


A string or regex delimiter. The default of ‘s+’ denotes one or more whitespace characters.  **kwargs

See read_csv for the full argument list.    Returns 
 DataFrame

A parsed DataFrame object.
pandas.read_feather   pandas.read_feather(path, columns=None, use_threads=True, storage_options=None)[source]
 
Load a feather-format object from the file path.  Parameters 
 
path:str, path object, or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a binary read() function. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.feather.  
columns:sequence, default None


If not provided, all columns are read.  
use_threads:bool, default True


Whether to parallelize reading using multiple threads.  
storage_options:dict, optional


Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to fsspec. Please see fsspec and urllib for more details.  New in version 1.2.0.     Returns 
 type of object stored in file
pandas.read_fwf   pandas.read_fwf(filepath_or_buffer, colspecs='infer', widths=None, infer_nrows=100, **kwds)[source]
 
Read a table of fixed-width formatted lines into DataFrame. Also supports optionally iterating or breaking of the file into chunks. Additional help can be found in the online docs for IO Tools.  Parameters 
 
filepath_or_buffer:str, path object, or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a text read() function.The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.csv.  
colspecs:list of tuple (int, int) or ‘infer’. optional


A list of tuples giving the extents of the fixed-width fields of each line as half-open intervals (i.e., [from, to[ ). String value ‘infer’ can be used to instruct the parser to try detecting the column specifications from the first 100 rows of the data which are not being skipped via skiprows (default=’infer’).  
widths:list of int, optional


A list of field widths which can be used instead of ‘colspecs’ if the intervals are contiguous.  
infer_nrows:int, default 100


The number of rows to consider when letting the parser determine the colspecs.  
**kwds:optional


Optional keyword arguments can be passed to TextFileReader.    Returns 
 DataFrame or TextFileReader

A comma-separated values (csv) file is returned as two-dimensional data structure with labeled axes.      See also  DataFrame.to_csv

Write DataFrame to a comma-separated values (csv) file.  read_csv

Read a comma-separated values (csv) file into DataFrame.    Examples 
>>> pd.read_fwf('data.csv')
pandas.read_hdf   pandas.read_hdf(path_or_buf, key=None, mode='r', errors='strict', where=None, start=None, stop=None, columns=None, iterator=False, chunksize=None, **kwargs)[source]
 
Read from the store, close it if we opened it. Retrieve pandas object stored in file, optionally based on where criteria.  Warning Pandas uses PyTables for reading and writing HDF5 files, which allows serializing object-dtype data with pickle when using the “fixed” format. Loading pickled data received from untrusted sources can be unsafe. See: https://docs.python.org/3/library/pickle.html for more.   Parameters 
 
path_or_buf:str, path object, pandas.HDFStore


Any valid string path is acceptable. Only supports the local file system, remote URLs and file-like objects are not supported. If you want to pass in a path object, pandas accepts any os.PathLike. Alternatively, pandas accepts an open pandas.HDFStore object.  
key:object, optional


The group identifier in the store. Can be omitted if the HDF file contains a single pandas object.  
mode:{‘r’, ‘r+’, ‘a’}, default ‘r’


Mode to use when opening the file. Ignored if path_or_buf is a pandas.HDFStore. Default is ‘r’.  
errors:str, default ‘strict’


Specifies how encoding and decoding errors are to be handled. See the errors argument for open() for a full list of options.  
where:list, optional


A list of Term (or convertible) objects.  
start:int, optional


Row number to start selection.  
stop:int, optional


Row number to stop selection.  
columns:list, optional


A list of columns names to return.  
iterator:bool, optional


Return an iterator object.  
chunksize:int, optional


Number of rows to include in an iteration when using an iterator.  **kwargs

Additional keyword arguments passed to HDFStore.    Returns 
 
item:object


The selected object. Return type depends on the object stored.      See also  DataFrame.to_hdf

Write a HDF file from a DataFrame.  HDFStore

Low-level access to HDF files.    Examples 
>>> df = pd.DataFrame([[1, 1.0, 'a']], columns=['x', 'y', 'z'])  
>>> df.to_hdf('./store.h5', 'data')  
>>> reread = pd.read_hdf('./store.h5')
pandas.read_orc   pandas.read_orc(path, columns=None, **kwargs)[source]
 
Load an ORC object from the file path, returning a DataFrame.  New in version 1.0.0.   Parameters 
 
path:str, path object, or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a binary read() function. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.orc.  
columns:list, default None


If not None, only these columns will be read from the file.  **kwargs

Any additional kwargs are passed to pyarrow.    Returns 
 DataFrame
   Notes Before using this function you should read the user guide about ORC and install optional dependencies.
pandas.read_parquet   pandas.read_parquet(path, engine='auto', columns=None, storage_options=None, use_nullable_dtypes=False, **kwargs)[source]
 
Load a parquet object from the file path, returning a DataFrame.  Parameters 
 
path:str, path object or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a binary read() function. The string could be a URL. Valid URL schemes include http, ftp, s3, gs, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.parquet. A file URL can also be a path to a directory that contains multiple partitioned parquet files. Both pyarrow and fastparquet support paths to directories as well as file URLs. A directory path could be: file://localhost/path/to/tables or s3://bucket/partition_dir.  
engine:{‘auto’, ‘pyarrow’, ‘fastparquet’}, default ‘auto’


Parquet library to use. If ‘auto’, then the option io.parquet.engine is used. The default io.parquet.engine behavior is to try ‘pyarrow’, falling back to ‘fastparquet’ if ‘pyarrow’ is unavailable.  
columns:list, default=None


If not None, only these columns will be read from the file.  
storage_options:dict, optional


Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to fsspec. Please see fsspec and urllib for more details.  New in version 1.3.0.   
use_nullable_dtypes:bool, default False


If True, use dtypes that use pd.NA as missing value indicator for the resulting DataFrame. (only applicable for the pyarrow engine) As new dtypes are added that support pd.NA in the future, the output with this option will change to use those dtypes. Note: this is an experimental option, and behaviour (e.g. additional support dtypes) may change without notice.  New in version 1.2.0.   **kwargs

Any additional kwargs are passed to the engine.    Returns 
 DataFrame
pandas.read_pickle   pandas.read_pickle(filepath_or_buffer, compression='infer', storage_options=None)[source]
 
Load pickled pandas object (or any object) from file.  Warning Loading pickled data received from untrusted sources can be unsafe. See here.   Parameters 
 
filepath_or_buffer:str, path object, or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a binary readlines() function.  Changed in version 1.0.0: Accept URL. URL is not limited to S3 and GCS.   
compression:str or dict, default ‘infer’


For on-the-fly decompression of on-disk data. If ‘infer’ and ‘filepath_or_buffer’ is path-like, then detect compression from the following extensions: ‘.gz’, ‘.bz2’, ‘.zip’, ‘.xz’, or ‘.zst’ (otherwise no compression). If using ‘zip’, the ZIP file must contain only one data file to be read in. Set to None for no decompression. Can also be a dict with key 'method' set to one of {'zip', 'gzip', 'bz2', 'zstd'} and other key-value pairs are forwarded to zipfile.ZipFile, gzip.GzipFile, bz2.BZ2File, or zstandard.ZstdDecompressor, respectively. As an example, the following could be passed for Zstandard decompression using a custom compression dictionary: compression={'method': 'zstd', 'dict_data': my_compression_dict}.  Changed in version 1.4.0: Zstandard support.   
storage_options:dict, optional


Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to fsspec. Please see fsspec and urllib for more details.  New in version 1.2.0.     Returns 
 
unpickled:same type as object stored in file

    See also  DataFrame.to_pickle

Pickle (serialize) DataFrame object to file.  Series.to_pickle

Pickle (serialize) Series object to file.  read_hdf

Read HDF5 file into a DataFrame.  read_sql

Read SQL query or database table into a DataFrame.  read_parquet

Load a parquet object, returning a DataFrame.    Notes read_pickle is only guaranteed to be backwards compatible to pandas 0.20.3. Examples 
>>> original_df = pd.DataFrame({"foo": range(5), "bar": range(5, 10)})  
>>> original_df  
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> pd.to_pickle(original_df, "./dummy.pkl")  
  
>>> unpickled_df = pd.read_pickle("./dummy.pkl")  
>>> unpickled_df  
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
pandas.read_sas   pandas.read_sas(filepath_or_buffer, format=None, index=None, encoding=None, chunksize=None, iterator=False)[source]
 
Read SAS files stored as either XPORT or SAS7BDAT format files.  Parameters 
 
filepath_or_buffer:str, path object, or file-like object


String, path object (implementing os.PathLike[str]), or file-like object implementing a binary read() function. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.sas.  
format:str {‘xport’, ‘sas7bdat’} or None


If None, file format is inferred from file extension. If ‘xport’ or ‘sas7bdat’, uses the corresponding format.  
index:identifier of index column, defaults to None


Identifier of column that should be used as index of the DataFrame.  
encoding:str, default is None


Encoding for text data. If None, text data are stored as raw bytes.  
chunksize:int


Read file chunksize lines at a time, returns iterator.  Changed in version 1.2: TextFileReader is a context manager.   
iterator:bool, defaults to False


If True, returns an iterator for reading the file incrementally.  Changed in version 1.2: TextFileReader is a context manager.     Returns 
 DataFrame if iterator=False and chunksize=None, else SAS7BDATReader
or XportReader
pandas.read_spss   pandas.read_spss(path, usecols=None, convert_categoricals=True)[source]
 
Load an SPSS file from the file path, returning a DataFrame.  New in version 0.25.0.   Parameters 
 
path:str or Path


File path.  
usecols:list-like, optional


Return a subset of the columns. If None, return all columns.  
convert_categoricals:bool, default is True


Convert categorical columns into pd.Categorical.    Returns 
 DataFrame
pandas.read_sql_query   pandas.read_sql_query(sql, con, index_col=None, coerce_float=True, params=None, parse_dates=None, chunksize=None, dtype=None)[source]
 
Read SQL query into a DataFrame. Returns a DataFrame corresponding to the result set of the query string. Optionally provide an index_col parameter to use one of the columns as the index, otherwise default integer index will be used.  Parameters 
 
sql:str SQL query or SQLAlchemy Selectable (select or text object)


SQL query to be executed.  
con:SQLAlchemy connectable, str, or sqlite3 connection


Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported.  
index_col:str or list of str, optional, default: None


Column(s) to set as index(MultiIndex).  
coerce_float:bool, default True


Attempts to convert values of non-string, non-numeric objects (like decimal.Decimal) to floating point. Useful for SQL result sets.  
params:list, tuple or dict, optional, default: None


List of parameters to pass to execute method. The syntax used to pass parameters is database driver dependent. Check your database driver documentation for which of the five syntax styles, described in PEP 249’s paramstyle, is supported. Eg. for psycopg2, uses %(name)s so use params={‘name’ : ‘value’}.  
parse_dates:list or dict, default: None


 List of column names to parse as dates. Dict of {column_name: format string} where format string is strftime compatible in case of parsing string times, or is one of (D, s, ns, ms, us) in case of parsing integer timestamps. Dict of {column_name: arg dict}, where the arg dict corresponds to the keyword arguments of pandas.to_datetime() Especially useful with databases without native Datetime support, such as SQLite.   
chunksize:int, default None


If specified, return an iterator where chunksize is the number of rows to include in each chunk.  
dtype:Type name or dict of columns


Data type for data or columns. E.g. np.float64 or {‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64’}.  New in version 1.3.0.     Returns 
 DataFrame or Iterator[DataFrame]
    See also  read_sql_table

Read SQL database table into a DataFrame.  read_sql

Read SQL query or database table into a DataFrame.    Notes Any datetime values with time zone information parsed via the parse_dates parameter will be converted to UTC.