neulab/docprompting-conala huggingface dataset:
pandas.DatetimeIndex.weekofyear   propertyDatetimeIndex.weekofyear
 
The week ordinal of the year.  Deprecated since version 1.1.0.  weekofyear and week have been deprecated. Please use DatetimeIndex.isocalendar().week instead.
pandas.DatetimeIndex.year   propertyDatetimeIndex.year
 
The year of the datetime. Examples 
>>> datetime_series = pd.Series(
...     pd.date_range("2000-01-01", periods=3, freq="Y")
... )
>>> datetime_series
0   2000-12-31
1   2001-12-31
2   2002-12-31
dtype: datetime64[ns]
>>> datetime_series.dt.year
0    2000
1    2001
2    2002
dtype: int64
pandas.DatetimeTZDtype   classpandas.DatetimeTZDtype(unit='ns', tz=None)[source]
 
An ExtensionDtype for timezone-aware datetime data. This is not an actual numpy dtype, but a duck type.  Parameters 
 
unit:str, default “ns”


The precision of the datetime data. Currently limited to "ns".  
tz:str, int, or datetime.tzinfo


The timezone.    Raises 
 pytz.UnknownTimeZoneError

When the requested timezone cannot be found.     Examples 
>>> pd.DatetimeTZDtype(tz='UTC')
datetime64[ns, UTC]
  
>>> pd.DatetimeTZDtype(tz='dateutil/US/Central')
datetime64[ns, tzfile('/usr/share/zoneinfo/US/Central')]
  Attributes       
unit The precision of the datetime data.  
tz The timezone.    Methods       
None
pandas.DatetimeTZDtype.tz   propertyDatetimeTZDtype.tz
 
The timezone.
pandas.DatetimeTZDtype.unit   propertyDatetimeTZDtype.unit
 
The precision of the datetime data.
pandas.errors.AbstractMethodError   exceptionpandas.errors.AbstractMethodError(class_instance, methodtype='method')[source]
 
Raise this error instead of NotImplementedError for abstract methods while keeping compatibility with Python 2 and Python 3.
pandas.errors.AccessorRegistrationWarning   exceptionpandas.errors.AccessorRegistrationWarning[source]
 
Warning for attribute conflicts in accessor registration.
pandas.errors.DtypeWarning   exceptionpandas.errors.DtypeWarning[source]
 
Warning raised when reading different dtypes in a column from a file. Raised for a dtype incompatibility. This can happen whenever read_csv or read_table encounter non-uniform dtypes in a column(s) of a given CSV file.  See also  read_csv

Read CSV (comma-separated) file into a DataFrame.  read_table

Read general delimited file into a DataFrame.    Notes This warning is issued when dealing with larger files because the dtype checking happens per chunk read. Despite the warning, the CSV file is read with mixed types in a single column which will be an object type. See the examples below to better understand this issue. Examples This example creates and reads a large CSV file with a column that contains int and str. 
>>> df = pd.DataFrame({'a': (['1'] * 100000 + ['X'] * 100000 +
...                          ['1'] * 100000),
...                    'b': ['b'] * 300000})  
>>> df.to_csv('test.csv', index=False)  
>>> df2 = pd.read_csv('test.csv')  
... # DtypeWarning: Columns (0) have mixed types
  Important to notice that df2 will contain both str and int for the same input, ‘1’. 
>>> df2.iloc[262140, 0]  
'1'
>>> type(df2.iloc[262140, 0])  
<class 'str'>
>>> df2.iloc[262150, 0]  
1
>>> type(df2.iloc[262150, 0])  
<class 'int'>
  One way to solve this issue is using the dtype parameter in the read_csv and read_table functions to explicit the conversion: 
>>> df2 = pd.read_csv('test.csv', sep=',', dtype={'a': str})  
  No warning was issued.
pandas.errors.DuplicateLabelError   exceptionpandas.errors.DuplicateLabelError[source]
 
Error raised when an operation would introduce duplicate labels.  New in version 1.2.0.  Examples 
>>> s = pd.Series([0, 1, 2], index=['a', 'b', 'c']).set_flags(
...     allows_duplicate_labels=False
... )
>>> s.reindex(['a', 'a', 'b'])
Traceback (most recent call last):
   ...
DuplicateLabelError: Index has duplicates.
      positions
label
a        [0, 1]
pandas.errors.EmptyDataError   exceptionpandas.errors.EmptyDataError[source]
 
Exception that is thrown in pd.read_csv (by both the C and Python engines) when empty data or header is encountered.
pandas.errors.IntCastingNaNError   exceptionpandas.errors.IntCastingNaNError[source]
 
Raised when attempting an astype operation on an array with NaN to an integer dtype.
pandas.errors.InvalidIndexError   exceptionpandas.errors.InvalidIndexError[source]
 
Exception raised when attempting to use an invalid index key.  New in version 1.1.0.
pandas.errors.MergeError   exceptionpandas.errors.MergeError[source]
 
Error raised when problems arise during merging due to problems with input data. Subclass of ValueError.
pandas.errors.NullFrequencyError   exceptionpandas.errors.NullFrequencyError[source]
 
Error raised when a null freq attribute is used in an operation that needs a non-null frequency, particularly DatetimeIndex.shift, TimedeltaIndex.shift, PeriodIndex.shift.
pandas.errors.NumbaUtilError   exceptionpandas.errors.NumbaUtilError[source]
 
Error raised for unsupported Numba engine routines.
pandas.errors.OptionError   exceptionpandas.errors.OptionError[source]
 
Exception for pandas.options, backwards compatible with KeyError checks.
pandas.errors.OutOfBoundsDatetime   exceptionpandas.errors.OutOfBoundsDatetime
pandas.errors.OutOfBoundsTimedelta   exceptionpandas.errors.OutOfBoundsTimedelta
 
Raised when encountering a timedelta value that cannot be represented as a timedelta64[ns].
pandas.errors.ParserError   exceptionpandas.errors.ParserError[source]
 
Exception that is raised by an error encountered in parsing file contents. This is a generic error raised for errors encountered when functions like read_csv or read_html are parsing contents of a file.  See also  read_csv

Read CSV (comma-separated) file into a DataFrame.  read_html

Read HTML table into a DataFrame.
pandas.errors.ParserWarning   exceptionpandas.errors.ParserWarning[source]
 
Warning raised when reading a file that doesn’t use the default ‘c’ parser. Raised by pd.read_csv and pd.read_table when it is necessary to change parsers, generally from the default ‘c’ parser to ‘python’. It happens due to a lack of support or functionality for parsing a particular attribute of a CSV file with the requested engine. Currently, ‘c’ unsupported options include the following parameters:  sep other than a single character (e.g. regex separators) skipfooter higher than 0 sep=None with delim_whitespace=False  The warning can be avoided by adding engine=’python’ as a parameter in pd.read_csv and pd.read_table methods.  See also  pd.read_csv

Read CSV (comma-separated) file into DataFrame.  pd.read_table

Read general delimited file into DataFrame.    Examples Using a sep in pd.read_csv other than a single character: 
>>> import io
>>> csv = '''a;b;c
...           1;1,8
...           1;2,1'''
>>> df = pd.read_csv(io.StringIO(csv), sep='[;,]')  
... # ParserWarning: Falling back to the 'python' engine...
  Adding engine=’python’ to pd.read_csv removes the Warning: 
>>> df = pd.read_csv(io.StringIO(csv), sep='[;,]', engine='python')
pandas.errors.PerformanceWarning   exceptionpandas.errors.PerformanceWarning[source]
 
Warning raised when there is a possible performance impact.
pandas.errors.UnsortedIndexError   exceptionpandas.errors.UnsortedIndexError[source]
 
Error raised when attempting to get a slice of a MultiIndex, and the index has not been lexsorted. Subclass of KeyError.
pandas.errors.UnsupportedFunctionCall   exceptionpandas.errors.UnsupportedFunctionCall[source]
 
Exception raised when attempting to call a numpy function on a pandas object, but that function is not supported by the object e.g. np.cumsum(groupby_object).
pandas.ExcelFile.parse   ExcelFile.parse(sheet_name=0, header=0, names=None, index_col=None, usecols=None, squeeze=None, converters=None, true_values=None, false_values=None, skiprows=None, nrows=None, na_values=None, parse_dates=False, date_parser=None, thousands=None, comment=None, skipfooter=0, convert_float=None, mangle_dupe_cols=True, **kwds)[source]
 
Parse specified sheet(s) into a DataFrame. Equivalent to read_excel(ExcelFile, …) See the read_excel docstring for more info on accepted parameters.  Returns 
 DataFrame or dict of DataFrames

DataFrame from the passed in Excel file.
pandas.Flags   classpandas.Flags(obj, *, allows_duplicate_labels)[source]
 
Flags that apply to pandas objects.  New in version 1.2.0.   Parameters 
 
obj:Series or DataFrame


The object these flags are associated with.  
allows_duplicate_labels:bool, default True


Whether to allow duplicate labels in this object. By default, duplicate labels are permitted. Setting this to False will cause an errors.DuplicateLabelError to be raised when index (or columns for DataFrame) is not unique, or any subsequent operation on introduces duplicates. See Disallowing Duplicate Labels for more.  Warning This is an experimental feature. Currently, many methods fail to propagate the allows_duplicate_labels value. In future versions it is expected that every method taking or returning one or more DataFrame or Series objects will propagate allows_duplicate_labels.      Notes Attributes can be set in two ways 
>>> df = pd.DataFrame()
>>> df.flags
<Flags(allows_duplicate_labels=True)>
>>> df.flags.allows_duplicate_labels = False
>>> df.flags
<Flags(allows_duplicate_labels=False)>
  
>>> df.flags['allows_duplicate_labels'] = True
>>> df.flags
<Flags(allows_duplicate_labels=True)>
  Attributes       
allows_duplicate_labels Whether this object allows duplicate labels.
pandas.Flags.allows_duplicate_labels   propertyFlags.allows_duplicate_labels
 
Whether this object allows duplicate labels. Setting allows_duplicate_labels=False ensures that the index (and columns of a DataFrame) are unique. Most methods that accept and return a Series or DataFrame will propagate the value of allows_duplicate_labels. See Duplicate Labels for more.  See also  DataFrame.attrs

Set global metadata on this object.  DataFrame.set_flags

Set global flags on this object.    Examples 
>>> df = pd.DataFrame({"A": [1, 2]}, index=['a', 'a'])
>>> df.flags.allows_duplicate_labels
True
>>> df.flags.allows_duplicate_labels = False
Traceback (most recent call last):
    ...
pandas.errors.DuplicateLabelError: Index has duplicates.
      positions
label
a        [0, 1]
pandas.Float64Index   classpandas.Float64Index(data=None, dtype=None, copy=False, name=None)[source]
 
Immutable sequence used for indexing and alignment. The basic object storing axis labels for all pandas objects. Float64Index is a special case of Index with purely float labels. .  Deprecated since version 1.4.0: In pandas v2.0 Float64Index will be removed and NumericIndex used instead. Float64Index will remain fully functional for the duration of pandas 1.x.   Parameters 
 
data:array-like (1-dimensional)


dtype:NumPy dtype (default: float64)


copy:bool


Make a copy of input ndarray.  
name:object


Name to be stored in the index.      See also  Index

The base pandas Index type.  NumericIndex

Index of numpy int/uint/float data.    Notes An Index instance can only contain hashable objects. Attributes       
None     Methods       
None
pandas.get_dummies   pandas.get_dummies(data, prefix=None, prefix_sep='_', dummy_na=False, columns=None, sparse=False, drop_first=False, dtype=None)[source]
 
Convert categorical variable into dummy/indicator variables.  Parameters 
 
data:array-like, Series, or DataFrame


Data of which to get dummy indicators.  
prefix:str, list of str, or dict of str, default None


String to append DataFrame column names. Pass a list with length equal to the number of columns when calling get_dummies on a DataFrame. Alternatively, prefix can be a dictionary mapping column names to prefixes.  
prefix_sep:str, default ‘_’


If appending prefix, separator/delimiter to use. Or pass a list or dictionary as with prefix.  
dummy_na:bool, default False


Add a column to indicate NaNs, if False NaNs are ignored.  
columns:list-like, default None


Column names in the DataFrame to be encoded. If columns is None then all the columns with object or category dtype will be converted.  
sparse:bool, default False


Whether the dummy-encoded columns should be backed by a SparseArray (True) or a regular NumPy array (False).  
drop_first:bool, default False


Whether to get k-1 dummies out of k categorical levels by removing the first level.  
dtype:dtype, default np.uint8


Data type for new columns. Only a single dtype is allowed.    Returns 
 DataFrame

Dummy-coded data.      See also  Series.str.get_dummies

Convert Series to dummy codes.    Examples 
>>> s = pd.Series(list('abca'))
  
>>> pd.get_dummies(s)
   a  b  c
0  1  0  0
1  0  1  0
2  0  0  1
3  1  0  0
  
>>> s1 = ['a', 'b', np.nan]
  
>>> pd.get_dummies(s1)
   a  b
0  1  0
1  0  1
2  0  0
  
>>> pd.get_dummies(s1, dummy_na=True)
   a  b  NaN
0  1  0    0
1  0  1    0
2  0  0    1
  
>>> df = pd.DataFrame({'A': ['a', 'b', 'a'], 'B': ['b', 'a', 'c'],
...                    'C': [1, 2, 3]})
  
>>> pd.get_dummies(df, prefix=['col1', 'col2'])
   C  col1_a  col1_b  col2_a  col2_b  col2_c
0  1       1       0       0       1       0
1  2       0       1       1       0       0
2  3       1       0       0       0       1
  
>>> pd.get_dummies(pd.Series(list('abcaa')))
   a  b  c
0  1  0  0
1  0  1  0
2  0  0  1
3  1  0  0
4  1  0  0
  
>>> pd.get_dummies(pd.Series(list('abcaa')), drop_first=True)
   b  c
0  0  0
1  1  0
2  0  1
3  0  0
4  0  0
  
>>> pd.get_dummies(pd.Series(list('abc')), dtype=float)
     a    b    c
0  1.0  0.0  0.0
1  0.0  1.0  0.0
2  0.0  0.0  1.0
pandas.HDFStore.append   HDFStore.append(key, value, format=None, axes=None, index=True, append=True, complib=None, complevel=None, columns=None, min_itemsize=None, nan_rep=None, chunksize=None, expectedrows=None, dropna=None, data_columns=None, encoding=None, errors='strict')[source]
 
Append to Table in file. Node must already exist and be Table format.  Parameters 
 
key:str


value:{Series, DataFrame}


format:‘table’ is the default


Format to use when storing object in HDFStore. Value can be one of:  'table'

Table format. Write as a PyTables Table structure which may perform worse but allow more flexible operations like searching / selecting subsets of the data.    
append:bool, default True


Append the input data to the existing.  
data_columns:list of columns, or True, default None


List of columns to create as indexed data columns for on-disk queries, or True to use all columns. By default only the axes of the object are indexed. See here.  
min_itemsize:dict of columns that specify minimum str sizes


nan_rep:str to use as str nan representation


chunksize:size to chunk the writing


expectedrows:expected TOTAL row size of this table


encoding:default None, provide an encoding for str


dropna:bool, default False


Do not write an ALL nan row to the store settable by the option ‘io.hdf.dropna_table’.     Notes Does not check if data being appended overlaps with existing data in the table, so be careful
pandas.HDFStore.get   HDFStore.get(key)[source]
 
Retrieve pandas object stored in file.  Parameters 
 
key:str

  Returns 
 object

Same type as object stored in file.
pandas.HDFStore.groups   HDFStore.groups()[source]
 
Return a list of all the top-level nodes. Each node returned is not a pandas storage object.  Returns 
 list

List of objects.
pandas.HDFStore.info   HDFStore.info()[source]
 
Print detailed information on the store.  Returns 
 str
pandas.HDFStore.keys   HDFStore.keys(include='pandas')[source]
 
Return a list of keys corresponding to objects stored in HDFStore.  Parameters 
 
include:str, default ‘pandas’


When kind equals ‘pandas’ return pandas objects. When kind equals ‘native’ return native HDF5 Table objects.  New in version 1.1.0.     Returns 
 list

List of ABSOLUTE path-names (e.g. have the leading ‘/’).    Raises 
 raises ValueError if kind has an illegal value
pandas.HDFStore.put   HDFStore.put(key, value, format=None, index=True, append=False, complib=None, complevel=None, min_itemsize=None, nan_rep=None, data_columns=None, encoding=None, errors='strict', track_times=True, dropna=False)[source]
 
Store object in HDFStore.  Parameters 
 
key:str


value:{Series, DataFrame}


format:‘fixed(f)|table(t)’, default is ‘fixed’


Format to use when storing object in HDFStore. Value can be one of:  'fixed'

Fixed format. Fast writing/reading. Not-appendable, nor searchable.  'table'

Table format. Write as a PyTables Table structure which may perform worse but allow more flexible operations like searching / selecting subsets of the data.    
append:bool, default False


This will force Table format, append the input data to the existing.  
data_columns:list of columns or True, default None


List of columns to create as data columns, or True to use all columns. See here.  
encoding:str, default None


Provide an encoding for strings.  
track_times:bool, default True


Parameter is propagated to ‘create_table’ method of ‘PyTables’. If set to False it enables to have the same h5 files (same hashes) independent on creation time.  New in version 1.1.0.
pandas.HDFStore.select   HDFStore.select(key, where=None, start=None, stop=None, columns=None, iterator=False, chunksize=None, auto_close=False)[source]
 
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 
 
key:str


Object being retrieved from file.  
where:list or None


List of Term (or convertible) objects, optional.  
start:int or None


Row number to start selection.  
stop:int, default None


Row number to stop selection.  
columns:list or None


A list of columns that if not None, will limit the return columns.  
iterator:bool or False


Returns an iterator.  
chunksize:int or None


Number or rows to include in iteration, return an iterator.  
auto_close:bool or False


Should automatically close the store when finished.    Returns 
 object

Retrieved object from file.
pandas.HDFStore.walk   HDFStore.walk(where='/')[source]
 
Walk the pytables group hierarchy for pandas objects. This generator will yield the group path, subgroups and pandas object names for each group. Any non-pandas PyTables objects that are not a group will be ignored. The where group itself is listed first (preorder), then each of its child groups (following an alphanumerical order) is also traversed, following the same procedure.  Parameters 
 
where:str, default “/”


Group where to start walking.    Yields 
 
path:str


Full path to a group (without trailing ‘/’).  
groups:list


Names (strings) of the groups contained in path.  
leaves:list


Names (strings) of the pandas objects contained in path.
pandas.Index.all   Index.all(*args, **kwargs)[source]
 
Return whether all elements are Truthy.  Parameters 
 *args

Required for compatibility with numpy.  **kwargs

Required for compatibility with numpy.    Returns 
 
all:bool or array-like (if axis is specified)


A single element array-like may be converted to bool.      See also  Index.any

Return whether any element in an Index is True.  Series.any

Return whether any element in a Series is True.  Series.all

Return whether all elements in a Series are True.    Notes Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero. Examples True, because nonzero integers are considered True. 
>>> pd.Index([1, 2, 3]).all()
True
  False, because 0 is considered False. 
>>> pd.Index([0, 1, 2]).all()
False
pandas.Index.any   Index.any(*args, **kwargs)[source]
 
Return whether any element is Truthy.  Parameters 
 *args

Required for compatibility with numpy.  **kwargs

Required for compatibility with numpy.    Returns 
 
any:bool or array-like (if axis is specified)


A single element array-like may be converted to bool.      See also  Index.all

Return whether all elements are True.  Series.all

Return whether all elements are True.    Notes Not a Number (NaN), positive infinity and negative infinity evaluate to True because these are not equal to zero. Examples 
>>> index = pd.Index([0, 1, 2])
>>> index.any()
True
  
>>> index = pd.Index([0, 0, 0])
>>> index.any()
False
pandas.Index.append   Index.append(other)[source]
 
Append a collection of Index options together.  Parameters 
 
other:Index or list/tuple of indices

  Returns 
 Index
pandas.Index.argmax   Index.argmax(axis=None, skipna=True, *args, **kwargs)[source]
 
Return int position of the largest value in the Series. If the maximum is achieved in multiple locations, the first row position is returned.  Parameters 
 
axis:{None}


Dummy argument for consistency with Series.  
skipna:bool, default True


Exclude NA/null values when showing the result.  *args, **kwargs

Additional arguments and keywords for compatibility with NumPy.    Returns 
 int

Row position of the maximum value.      See also  Series.argmax

Return position of the maximum value.  Series.argmin

Return position of the minimum value.  numpy.ndarray.argmax

Equivalent method for numpy arrays.  Series.idxmax

Return index label of the maximum values.  Series.idxmin

Return index label of the minimum values.    Examples Consider dataset containing cereal calories 
>>> s = pd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
...                'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
>>> s
Corn Flakes              100.0
Almond Delight           110.0
Cinnamon Toast Crunch    120.0
Cocoa Puff               110.0
dtype: float64
  
>>> s.argmax()
2
>>> s.argmin()
0
  The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.
pandas.Index.argmin   Index.argmin(axis=None, skipna=True, *args, **kwargs)[source]
 
Return int position of the smallest value in the Series. If the minimum is achieved in multiple locations, the first row position is returned.  Parameters 
 
axis:{None}


Dummy argument for consistency with Series.  
skipna:bool, default True


Exclude NA/null values when showing the result.  *args, **kwargs

Additional arguments and keywords for compatibility with NumPy.    Returns 
 int

Row position of the minimum value.      See also  Series.argmin

Return position of the minimum value.  Series.argmax

Return position of the maximum value.  numpy.ndarray.argmin

Equivalent method for numpy arrays.  Series.idxmax

Return index label of the maximum values.  Series.idxmin

Return index label of the minimum values.    Examples Consider dataset containing cereal calories 
>>> s = pd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
...                'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
>>> s
Corn Flakes              100.0
Almond Delight           110.0
Cinnamon Toast Crunch    120.0
Cocoa Puff               110.0
dtype: float64
  
>>> s.argmax()
2
>>> s.argmin()
0
  The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.
pandas.Index.argsort   Index.argsort(*args, **kwargs)[source]
 
Return the integer indices that would sort the index.  Parameters 
 *args

Passed to numpy.ndarray.argsort.  **kwargs

Passed to numpy.ndarray.argsort.    Returns 
 np.ndarray[np.intp]

Integer indices that would sort the index if used as an indexer.      See also  numpy.argsort

Similar method for NumPy arrays.  Index.sort_values

Return sorted copy of Index.    Examples 
>>> idx = pd.Index(['b', 'a', 'd', 'c'])
>>> idx
Index(['b', 'a', 'd', 'c'], dtype='object')
  
>>> order = idx.argsort()
>>> order
array([1, 0, 3, 2])
  
>>> idx[order]
Index(['a', 'b', 'c', 'd'], dtype='object')