Perform floor operation on the data to the specified freq.
The frequency level to floor the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values.
Only relevant for DatetimeIndex:
‘infer’ will attempt to infer fall dst-transition hours based on order
bool-ndarray where True signifies a DST time, False designates a non-DST time (note that this flag is only applicable for ambiguous times)
‘NaT’ will return NaT where there are ambiguous times
‘raise’ will raise an AmbiguousTimeError if there are ambiguous times.
A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.
‘shift_forward’ will shift the nonexistent time forward to the closest existing time
‘shift_backward’ will shift the nonexistent time backward to the closest existing time
‘NaT’ will return NaT where there are nonexistent times
timedelta objects will shift nonexistent times by the timedelta
‘raise’ will raise an NonExistentTimeError if there are nonexistent times.
Index of the same type for a DatetimeIndex or TimedeltaIndex, or a Series with the same index for a Series.
Notes
If the timestamps have a timezone, flooring will take place relative to the local (“wall”) time and re-localized to the same timezone. When flooring near daylight savings time, use nonexistent and ambiguous to control the re-localization behavior.
Examples
DatetimeIndex
Series
When rounding near a daylight savings time transition, use ambiguous or nonexistent to control how the timestamp should be re-localized.


Return the frequency object if it is set, otherwise None.


Return the frequency object as a string if its set, otherwise None.


Return index locations of values at particular time of day (e.g. 9:30AM).
Time passed in either as object (datetime.time) or as string in appropriate format (“%H:%M”, “%H%M”, “%I:%M%p”, “%I%M%p”, “%H:%M:%S”, “%H%M%S”, “%I:%M:%S%p”, “%I%M%S%p”).
See also
Get index locations of values between particular times of day.
Select values at particular time of day.


Return index locations of values between particular times of day (e.g., 9:00-9:30AM).
Time passed either as object (datetime.time) or as string in appropriate format (“%H:%M”, “%H%M”, “%I:%M%p”, “%I%M%p”, “%H:%M:%S”, “%H%M%S”, “%I:%M:%S%p”,”%I%M%S%p”).
See also
Get index locations of values at particular time of day.
Select values between particular times of day.


Tries to return a string representing a frequency guess, generated by infer_freq. Returns None if it can’t autodetect the frequency.


Boolean indicator if the date belongs to a leap year.
A leap year is a year, which has 366 days (instead of 365) including 29th of February as an intercalary day. Leap years are years which are multiples of four with the exception of years divisible by 100 but not by 400.
Booleans indicating if dates belong to a leap year.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicates whether the date is the last day of the month.
For Series, returns a Series with boolean values. For DatetimeIndex, returns a boolean array.
See also
Return a boolean indicating whether the date is the first day of the month.
Return a boolean indicating whether the date is the last day of the month.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicates whether the date is the first day of the month.
For Series, returns a Series with boolean values. For DatetimeIndex, returns a boolean array.
See also
Return a boolean indicating whether the date is the first day of the month.
Return a boolean indicating whether the date is the last day of the month.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicator for whether the date is the last day of a quarter.
The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.
See also
Return the quarter of the date.
Similar property indicating the quarter start.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicator for whether the date is the first day of a quarter.
The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.
See also
Return the quarter of the date.
Similar property for indicating the quarter start.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicate whether the date is the last day of the year.
The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.
See also
Similar property indicating the start of the year.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Indicate whether the date is the first day of a year.
The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.
See also
Similar property indicating the last day of the year.
Examples
This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.


Return the mean value of the Array.
New in version 0.25.0.
Whether to ignore any NaT elements.
Timestamp or Timedelta.
See also
Returns the average of array elements along a given axis.
Return the mean value in a Series.
Notes
mean is only defined for Datetime and Timedelta dtypes, not for Period.


The microseconds of the datetime.
Examples


The month as January=1, December=12.
Examples


Return the month names of the DateTimeIndex with specified locale.
Locale determining the language in which to return the month name. Default is English locale.
Index of month names.
Examples


The nanoseconds of the datetime.
Examples


Convert times to midnight.
The time component of the date-time is converted to midnight i.e. 00:00:00. This is useful in cases, when the time does not matter. Length is unaltered. The timezones are unaffected.
This method is available on Series with datetime values under the .dt accessor, and directly on Datetime Array/Index.
The same type as the original data. Series will have the same name and index. DatetimeIndex will have the same name.
See also
Floor the datetimes to the specified freq.
Ceil the datetimes to the specified freq.
Round the datetimes to the specified freq.
Examples


Perform round operation on the data to the specified freq.
The frequency level to round the index to. Must be a fixed frequency like ‘S’ (second) not ‘ME’ (month end). See frequency aliases for a list of possible freq values.
Only relevant for DatetimeIndex:
‘infer’ will attempt to infer fall dst-transition hours based on order
bool-ndarray where True signifies a DST time, False designates a non-DST time (note that this flag is only applicable for ambiguous times)
‘NaT’ will return NaT where there are ambiguous times
‘raise’ will raise an AmbiguousTimeError if there are ambiguous times.
A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.
‘shift_forward’ will shift the nonexistent time forward to the closest existing time
‘shift_backward’ will shift the nonexistent time backward to the closest existing time
‘NaT’ will return NaT where there are nonexistent times
timedelta objects will shift nonexistent times by the timedelta
‘raise’ will raise an NonExistentTimeError if there are nonexistent times.
Index of the same type for a DatetimeIndex or TimedeltaIndex, or a Series with the same index for a Series.
Notes
If the timestamps have a timezone, rounding will take place relative to the local (“wall”) time and re-localized to the same timezone. When rounding near daylight savings time, use nonexistent and ambiguous to control the re-localization behavior.
Examples
DatetimeIndex
Series
When rounding near a daylight savings time transition, use ambiguous or nonexistent to control how the timestamp should be re-localized.


Snap time stamps to nearest occurring frequency.


Return sample standard deviation over requested axis.
Normalized by N-1 by default. This can be changed using the ddof argument
Axis for the function to be applied on.
Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.
Exclude NA/null values. If an entire row/column is NA, the result will be NA.


Convert to Index using specified date_format.
Return an Index of formatted strings specified by date_format, which supports the same string format as the python standard library. Details of the string format can be found in python string format doc.
Date format string (e.g. “%Y-%m-%d”).
NumPy ndarray of formatted strings.
See also
Convert the given argument to datetime.
Return DatetimeIndex with times to midnight.
Round the DatetimeIndex to the specified freq.
Floor the DatetimeIndex to the specified freq.
Examples


Returns numpy array of datetime.time objects.
The time part of the Timestamps.


Returns numpy array of datetime.time objects with timezone information.
The time part of the Timestamps.


Create a DataFrame with a column containing the Index.
Set the index of the returned DataFrame as the original Index.
The passed name should substitute for the index name (if it has one).
DataFrame containing the original Index data.
See also
Convert an Index to a Series.
Convert Series to DataFrame.
Examples
By default, the original Index is reused. To enforce a new Index:
To override the name of the resulting column, specify name:


Cast to PeriodArray/Index at a particular frequency.
Converts DatetimeArray/Index to PeriodArray/Index.
One of pandas’ offset strings or an Offset object. Will be inferred by default.
When converting a DatetimeArray/Index with non-regular values, so that a frequency cannot be inferred.
See also
Immutable ndarray holding ordinal values.
Return DatetimeIndex as object.
Examples
Infer the daily frequency


Calculate TimedeltaArray of difference between index values and index converted to PeriodArray at specified freq. Used for vectorized offsets.


Return Datetime Array/Index as object ndarray of datetime.datetime objects.


Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index.
Return the data keeping the timezone.
If keep_tz is True:
If the timezone is not set, the resulting Series will have a datetime64[ns] dtype.
Otherwise the Series will have an datetime64[ns, tz] dtype; the tz will be preserved.
If keep_tz is False:
Series will have a datetime64[ns] dtype. TZ aware objects will have the tz removed.
Changed in version 1.0.0: The default value is now True. In a future version, this keyword will be removed entirely. Stop passing the argument to obtain the future behavior and silence the warning.
Index of resulting Series. If None, defaults to original index.
Name of resulting Series. If None, defaults to name of original index.


Return the timezone.
Returns None when the array is tz-naive.


Convert tz-aware Datetime Array/Index from one time zone to another.
Time zone for time. Corresponding timestamps would be converted to this time zone of the Datetime Array/Index. A tz of None will convert to UTC and remove the timezone information.
If Datetime Array/Index is tz-naive.
See also
A timezone that has a variable offset from UTC.
Localize tz-naive DatetimeIndex to a given time zone, or remove timezone from a tz-aware DatetimeIndex.
Examples
With the tz parameter, we can change the DatetimeIndex to other time zones:
With the tz=None, we can remove the timezone (after converting to UTC if necessary):


Localize tz-naive Datetime Array/Index to tz-aware Datetime Array/Index.
This method takes a time zone (tz) naive Datetime Array/Index object and makes this time zone aware. It does not move the time to another time zone.
This method can also be used to do the inverse – to create a time zone unaware object from an aware object. To that end, pass tz=None.
Time zone to convert timestamps to. Passing None will remove the time zone information preserving local time.
When clocks moved backward due to DST, ambiguous times may arise. For example in Central European Time (UTC+01), when going from 03:00 DST to 02:00 non-DST, 02:30:00 local time occurs both at 00:30:00 UTC and at 01:30:00 UTC. In such a situation, the ambiguous parameter dictates how ambiguous times should be handled.
‘infer’ will attempt to infer fall dst-transition hours based on order
bool-ndarray where True signifies a DST time, False signifies a non-DST time (note that this flag is only applicable for ambiguous times)
‘NaT’ will return NaT where there are ambiguous times
‘raise’ will raise an AmbiguousTimeError if there are ambiguous times.
A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.
‘shift_forward’ will shift the nonexistent time forward to the closest existing time
‘shift_backward’ will shift the nonexistent time backward to the closest existing time
‘NaT’ will return NaT where there are nonexistent times
timedelta objects will shift nonexistent times by the timedelta
‘raise’ will raise an NonExistentTimeError if there are nonexistent times.
Array/Index converted to the specified time zone.
If the Datetime Array/Index is tz-aware and tz is not None.
See also
Convert tz-aware DatetimeIndex from one time zone to another.
Examples
Localize DatetimeIndex in US/Eastern time zone:
With the tz=None, we can remove the time zone information while keeping the local time (not converted to UTC):
Be careful with DST changes. When there is sequential data, pandas can infer the DST time:
In some cases, inferring the DST is impossible. In such cases, you can pass an ndarray to the ambiguous parameter to set the DST explicitly
If the DST transition causes nonexistent times, you can shift these dates forward or backwards with a timedelta object or ‘shift_forward’ or ‘shift_backwards’.


The week ordinal of the year.
Deprecated since version 1.1.0.
weekofyear and week have been deprecated. Please use DatetimeIndex.isocalendar().week instead.


The day of the week with Monday=0, Sunday=6.
Return the day of the week. It is assumed the week starts on Monday, which is denoted by 0 and ends on Sunday which is denoted by 6. This method is available on both Series with datetime values (using the dt accessor) or DatetimeIndex.
Containing integers indicating the day number.
See also
Alias.
Alias.
Returns the name of the day of the week.
Examples


An ExtensionDtype for timezone-aware datetime data.
This is not an actual numpy dtype, but a duck type.
The precision of the datetime data. Currently limited to "ns".
The timezone.
When the requested timezone cannot be found.
Examples
Attributes
unit
The precision of the datetime data.
tz
The timezone.
Methods
None


Prints the description for one or more registered options.
Call with no arguments to get a listing for all registered options.
Available options:
compute.[use_bottleneck, use_numba, use_numexpr]
display.[chop_threshold, colheader_justify, column_space, date_dayfirst, date_yearfirst, encoding, expand_frame_repr, float_format]
display.html.[border, table_schema, use_mathjax]
display.[large_repr]
display.latex.[escape, longtable, multicolumn, multicolumn_format, multirow, repr]
display.[max_categories, max_columns, max_colwidth, max_dir_items, max_info_columns, max_info_rows, max_rows, max_seq_items, memory_usage, min_rows, multi_sparse, notebook_repr_html, pprint_nest_depth, precision, show_dimensions]
display.unicode.[ambiguous_as_wide, east_asian_width]
display.[width]
io.excel.ods.[reader, writer]
io.excel.xls.[reader, writer]
io.excel.xlsb.[reader]
io.excel.xlsm.[reader, writer]
io.excel.xlsx.[reader, writer]
io.hdf.[default_format, dropna_table]
io.parquet.[engine]
io.sql.[engine]
mode.[chained_assignment, data_manager, sim_interactive, string_storage, use_inf_as_na, use_inf_as_null]
plotting.[backend]
plotting.matplotlib.[register_converters]
styler.format.[decimal, escape, formatter, na_rep, precision, thousands]
styler.html.[mathjax]
styler.latex.[environment, hrules, multicol_align, multirow_align]
styler.render.[encoding, max_columns, max_elements, max_rows, repr]
styler.sparse.[columns, index]
Regexp pattern. All matching keys will have their description displayed.
If True (default) the description(s) will be printed to stdout. Otherwise, the description(s) will be returned as a unicode string (for testing).
Notes
The available options with its descriptions:
Use the bottleneck library to accelerate if it is installed, the default is True Valid values: False,True [default: True] [currently: True]
Use the numba engine option for select operations if it is installed, the default is False Valid values: False,True [default: False] [currently: False]
Use the numexpr library to accelerate computation if it is installed, the default is True Valid values: False,True [default: True] [currently: True]
if set to a float value, all float values smaller then the given threshold will be displayed as exactly 0 by repr and friends. [default: None] [currently: None]
Controls the justification of column headers. used by DataFrameFormatter. [default: right] [currently: right]
[default: 12] [currently: 12]
When True, prints and parses dates with the day first, eg 20/01/2005 [default: False] [currently: False]
When True, prints and parses dates with the year first, eg 2005/01/20 [default: False] [currently: False]
Defaults to the detected encoding of the console. Specifies the encoding to be used for strings returned by to_string, these are generally strings meant to be displayed on the console. [default: utf-8] [currently: utf-8]
Whether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if its width exceeds display.width. [default: True] [currently: True]
The callable should accept a floating point number and return a string with the desired format of the number. This is used in some places like SeriesFormatter. See formats.format.EngFormatter for an example. [default: None] [currently: None]
A border=value attribute is inserted in the <table> tag for the DataFrame HTML repr. [default: 1] [currently: 1]
Whether to publish a Table Schema representation for frontends that support it. (default: False) [default: False] [currently: False]
When True, Jupyter notebook will process table contents using MathJax, rendering mathematical expressions enclosed by the dollar symbol. (default: True) [default: True] [currently: True]
For DataFrames exceeding max_rows/max_cols, the repr (and HTML repr) can show a truncated table (the default from 0.13), or switch to the view from df.info() (the behaviour in earlier versions of pandas). [default: truncate] [currently: truncate]
This specifies if the to_latex method of a Dataframe uses escapes special characters. Valid values: False,True [default: True] [currently: True]
This specifies if the to_latex method of a Dataframe uses the longtable format. Valid values: False,True [default: False] [currently: False]
This specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: True] [currently: True]
This specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: l] [currently: l]
This specifies if the to_latex method of a Dataframe uses multirows to pretty-print MultiIndex rows. Valid values: False,True [default: False] [currently: False]
Whether to produce a latex DataFrame representation for jupyter environments that support it. (default: False) [default: False] [currently: False]
This sets the maximum number of categories pandas should output when printing out a Categorical or a Series of dtype “category”. [default: 8] [currently: 8]
If max_cols is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. ‘None’ value means unlimited.
In case python/IPython is running in a terminal and large_repr equals ‘truncate’ this can be set to 0 and pandas will auto-detect the width of the terminal and print a truncated object which fits the screen width. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 0] [currently: 0]
The maximum width in characters of a column in the repr of a pandas data structure. When the column overflows, a “…” placeholder is embedded in the output. A ‘None’ value means unlimited. [default: 50] [currently: 50]
The number of items that will be added to dir(…). ‘None’ value means unlimited. Because dir is cached, changing this option will not immediately affect already existing dataframes until a column is deleted or added.
This is for instance used to suggest columns from a dataframe to tab completion. [default: 100] [currently: 100]
max_info_columns is used in DataFrame.info method to decide if per column information will be printed. [default: 100] [currently: 100]
df.info() will usually show null-counts for each column. For large frames this can be quite slow. max_info_rows and max_info_cols limit this null check only to frames with smaller dimensions than specified. [default: 1690785] [currently: 1690785]
If max_rows is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. ‘None’ value means unlimited.
In case python/IPython is running in a terminal and large_repr equals ‘truncate’ this can be set to 0 and pandas will auto-detect the height of the terminal and print a truncated object which fits the screen height. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 60] [currently: 60]
When pretty-printing a long sequence, no more then max_seq_items will be printed. If items are omitted, they will be denoted by the addition of “…” to the resulting string.
If set to None, the number of items to be printed is unlimited. [default: 100] [currently: 100]
This specifies if the memory usage of a DataFrame should be displayed when df.info() is called. Valid values True,False,’deep’ [default: True] [currently: True]
The numbers of rows to show in a truncated view (when max_rows is exceeded). Ignored when max_rows is set to None or 0. When set to None, follows the value of max_rows. [default: 10] [currently: 10]
“sparsify” MultiIndex display (don’t display repeated elements in outer levels within groups) [default: True] [currently: True]
When True, IPython notebook will use html representation for pandas objects (if it is available). [default: True] [currently: True]
Controls the number of nested levels to process when pretty-printing [default: 3] [currently: 3]
Floating point output precision in terms of number of places after the decimal, for regular formatting as well as scientific notation. Similar to precision in numpy.set_printoptions(). [default: 6] [currently: 6]
Whether to print out dimensions at the end of DataFrame repr. If ‘truncate’ is specified, only print out the dimensions if the frame is truncated (e.g. not display all rows and/or columns) [default: truncate] [currently: truncate]
Whether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]
Whether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]
Width of the display in characters. In case python/IPython is running in a terminal this can be set to None and pandas will correctly auto-detect the width. Note that the IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to correctly detect the width. [default: 80] [currently: 80]
The default Excel reader engine for ‘ods’ files. Available options: auto, odf. [default: auto] [currently: auto]
The default Excel writer engine for ‘ods’ files. Available options: auto, odf. [default: auto] [currently: auto]
The default Excel reader engine for ‘xls’ files. Available options: auto, xlrd. [default: auto] [currently: auto]
The default Excel writer engine for ‘xls’ files. Available options: auto, xlwt. [default: auto] [currently: auto] (Deprecated, use `` instead.)
The default Excel reader engine for ‘xlsb’ files. Available options: auto, pyxlsb. [default: auto] [currently: auto]
The default Excel reader engine for ‘xlsm’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]
The default Excel writer engine for ‘xlsm’ files. Available options: auto, openpyxl. [default: auto] [currently: auto]
The default Excel reader engine for ‘xlsx’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]
The default Excel writer engine for ‘xlsx’ files. Available options: auto, openpyxl, xlsxwriter. [default: auto] [currently: auto]
default format writing format, if None, then put will default to ‘fixed’ and append will default to ‘table’ [default: None] [currently: None]
drop ALL nan rows when appending to a table [default: False] [currently: False]
The default parquet reader/writer engine. Available options: ‘auto’, ‘pyarrow’, ‘fastparquet’, the default is ‘auto’ [default: auto] [currently: auto]
The default sql reader/writer engine. Available options: ‘auto’, ‘sqlalchemy’, the default is ‘auto’ [default: auto] [currently: auto]
Raise an exception, warn, or no action if trying to use chained assignment, The default is warn [default: warn] [currently: warn]
Internal data manager type; can be “block” or “array”. Defaults to “block”, unless overridden by the ‘PANDAS_DATA_MANAGER’ environment variable (needs to be set before pandas is imported). [default: block] [currently: block]
Whether to simulate interactive mode for purposes of testing [default: False] [currently: False]
The default storage for StringDtype. [default: python] [currently: python]
True means treat None, NaN, INF, -INF as NA (old way), False means None and NaN are null, but INF, -INF are not NA (new way). [default: False] [currently: False]
use_inf_as_null had been deprecated and will be removed in a future version. Use use_inf_as_na instead. [default: False] [currently: False] (Deprecated, use mode.use_inf_as_na instead.)
The plotting backend to use. The default value is “matplotlib”, the backend provided with pandas. Other backends can be specified by providing the name of the module that implements the backend. [default: matplotlib] [currently: matplotlib]
Whether to register converters with matplotlib’s units registry for dates, times, datetimes, and Periods. Toggling to False will remove the converters, restoring any converters that pandas overwrote. [default: auto] [currently: auto]
The character representation for the decimal separator for floats and complex. [default: .] [currently: .]
Whether to escape certain characters according to the given context; html or latex. [default: None] [currently: None]
A formatter object to be used as default within Styler.format. [default: None] [currently: None]
The string representation for values identified as missing. [default: None] [currently: None]
The precision for floats and complex numbers. [default: 6] [currently: 6]
The character representation for thousands separator for floats, int and complex. [default: None] [currently: None]
If False will render special CSS classes to table attributes that indicate Mathjax will not be used in Jupyter Notebook. [default: True] [currently: True]
The environment to replace \begin{table}. If “longtable” is used results in a specific longtable environment format. [default: None] [currently: None]
Whether to add horizontal rules on top and bottom and below the headers. [default: False] [currently: False]
The specifier for horizontal alignment of sparsified LaTeX multicolumns. Pipe decorators can also be added to non-naive values to draw vertical rules, e.g. “|r” will draw a rule on the left side of right aligned merged cells. [default: r] [currently: r]
The specifier for vertical alignment of sparsified LaTeX multirows. [default: c] [currently: c]
The encoding used for output HTML and LaTeX files. [default: utf-8] [currently: utf-8]
The maximum number of columns that will be rendered. May still be reduced to satsify max_elements, which takes precedence. [default: None] [currently: None]
The maximum number of data-cell (<td>) elements that will be rendered before trimming will occur over columns, rows or both if needed. [default: 262144] [currently: 262144]
The maximum number of rows that will be rendered. May still be reduced to satsify max_elements, which takes precedence. [default: None] [currently: None]
Determine which output to use in Jupyter Notebook in {“html”, “latex”}. [default: html] [currently: html]
Whether to sparsify the display of hierarchical columns. Setting to False will display each explicit level element in a hierarchical key for each column. [default: True] [currently: True]
Whether to sparsify the display of a hierarchical index. Setting to False will display each explicit level element in a hierarchical key for each row. [default: True] [currently: True]


Raise this error instead of NotImplementedError for abstract methods while keeping compatibility with Python 2 and Python 3.


Warning for attribute conflicts in accessor registration.


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 (comma-separated) file into a DataFrame.
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.
Important to notice that df2 will contain both str and int for the same input, ‘1’.
One way to solve this issue is using the dtype parameter in the read_csv and read_table functions to explicit the conversion:
No warning was issued.


Error raised when an operation would introduce duplicate labels.
New in version 1.2.0.
Examples


Exception that is thrown in pd.read_csv (by both the C and Python engines) when empty data or header is encountered.


Raised when attempting an astype operation on an array with NaN to an integer dtype.


Exception raised when attempting to use an invalid index key.
New in version 1.1.0.


Error raised when problems arise during merging due to problems with input data. Subclass of ValueError.


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.


Error raised for unsupported Numba engine routines.


Exception for pandas.options, backwards compatible with KeyError checks.


Raised when encountering a timedelta value that cannot be represented as a timedelta64[ns].


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 (comma-separated) file into a DataFrame.
Read HTML table into a DataFrame.


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
Read CSV (comma-separated) file into DataFrame.
Read general delimited file into DataFrame.
Examples
Using a sep in pd.read_csv other than a single character:
Adding engine=’python’ to pd.read_csv removes the Warning:


Warning raised when there is a possible performance impact.


Error raised when attempting to get a slice of a MultiIndex, and the index has not been lexsorted. Subclass of KeyError.


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).


Evaluate a Python expression as a string using various backends.
The following arithmetic operations are supported: +, -, *, /, **, %, // (python engine only) along with the following boolean operations: | (or), & (and), and ~ (not). Additionally, the 'pandas' parser allows the use of and, or, and not with the same semantics as the corresponding bitwise operators. Series and DataFrame objects are supported and behave as they would with plain ol’ Python evaluation.
The expression to evaluate. This string cannot contain any Python statements, only Python expressions.
The parser to use to construct the syntax tree from the expression. The default of 'pandas' parses code slightly different than standard Python. Alternatively, you can parse an expression using the 'python' parser to retain strict Python semantics. See the enhancing performance documentation for more details.
The engine used to evaluate the expression. Supported engines are
None : tries to use numexpr, falls back to python
numexpr for large speed ups in complex expressions with large frames.
level python. This engine is generally not that useful.
More backends may be available in the future.
Whether to use true division, like in Python >= 3.
Deprecated since version 1.0.0.
A dictionary of local variables, taken from locals() by default.
A dictionary of global variables, taken from globals() by default.
A list of objects implementing the __getitem__ special method that you can use to inject an additional collection of namespaces to use for variable lookup. For example, this is used in the query() method to inject the DataFrame.index and DataFrame.columns variables that refer to their respective DataFrame instance attributes.
The number of prior stack frames to traverse and add to the current scope. Most users will not need to change this parameter.
This is the target object for assignment. It is used when there is variable assignment in the expression. If so, then target must support item assignment with string keys, and if a copy is being returned, it must also support .copy().
If target is provided, and the expression mutates target, whether to modify target inplace. Otherwise, return a copy of target with the mutation.
The completion value of evaluating the given code or None if inplace=True.
There are many instances where such an error can be raised:
target=None, but the expression is multiline.
The expression is multiline, but not all them have item assignment. An example of such an arrangement is this:
a = b + 1 a + 2
Here, there are expressions on different lines, making it multiline, but the last line has no variable assigned to the output of a + 2.
inplace=True, but the expression is missing item assignment.
Item assignment is provided, but the target does not support string item assignment.
Item assignment is provided and inplace=False, but the target does not support the .copy() method
See also
Evaluates a boolean expression to query the columns of a frame.
Evaluate a string describing operations on DataFrame columns.
Notes
The dtype of any objects involved in an arithmetic % operation are recursively cast to float64.
See the enhancing performance documentation for more details.
Examples
We can add a new column using pd.eval:


Parse specified sheet(s) into a DataFrame.
Equivalent to read_excel(ExcelFile, …) See the read_excel docstring for more info on accepted parameters.
DataFrame from the passed in Excel file.


Class for writing DataFrame objects into excel sheets.
Default is to use : * xlwt for xls * xlsxwriter for xlsx if xlsxwriter is installed otherwise openpyxl * odf for ods. See DataFrame.to_excel for typical usage.
The writer should be used as a context manager. Otherwise, call close() to save and close any opened file handles.
Path to xls or xlsx or ods file.
Engine to use for writing. If None, defaults to io.excel.<extension>.writer. NOTE: can only be passed as a keyword argument.
Deprecated since version 1.2.0: As the xlwt package is no longer maintained, the xlwt engine will be removed in a future version of pandas.
Format string for dates written into Excel files (e.g. ‘YYYY-MM-DD’).
Format string for datetime objects written into Excel files. (e.g. ‘YYYY-MM-DD HH:MM:SS’).
File mode to use (write or append). Append does not work with fsspec URLs.
Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc., if using a URL that will be parsed by fsspec, e.g., starting “s3://”, “gcs://”.
New in version 1.2.0.
How to behave when trying to write to a sheet that already exists (append mode only).
error: raise a ValueError.
new: Create a new sheet, with a name determined by the engine.
replace: Delete the contents of the sheet before writing to it.
overlay: Write contents to the existing sheet without removing the old contents.
New in version 1.3.0.
Changed in version 1.4.0: Added overlay option
Keyword arguments to be passed into the engine. These will be passed to the following functions of the respective engines:
xlsxwriter: xlsxwriter.Workbook(file, **engine_kwargs)
openpyxl (write mode): openpyxl.Workbook(**engine_kwargs)
openpyxl (append mode): openpyxl.load_workbook(file, **engine_kwargs)
odswriter: odf.opendocument.OpenDocumentSpreadsheet(**engine_kwargs)
New in version 1.3.0.
Keyword arguments to be passed into the engine.
Deprecated since version 1.3.0: Use engine_kwargs instead.
Notes
None of the methods and properties are considered public.
For compatibility with CSV writers, ExcelWriter serializes lists and dicts to strings before writing.
Examples
Default usage:
To write to separate sheets in a single file:
You can set the date format or datetime format:
You can also append to an existing Excel file:
Here, the if_sheet_exists parameter can be set to replace a sheet if it already exists:
You can also write multiple DataFrames to a single sheet. Note that the if_sheet_exists parameter needs to be set to overlay:
You can store Excel file in RAM:
You can pack Excel file into zip archive:
You can specify additional arguments to the underlying engine:
In append mode, engine_kwargs are passed through to openpyxl’s load_workbook:
Attributes
None
Methods
None


Encode the object as an enumerated type or categorical variable.
This method is useful for obtaining a numeric representation of an array when all that matters is identifying distinct values. factorize is available as both a top-level function pandas.factorize(), and as a method Series.factorize() and Index.factorize().
A 1-D sequence. Sequences that aren’t pandas objects are coerced to ndarrays before factorization.
Sort uniques and shuffle codes to maintain the relationship.
Value to mark “not found”. If None, will not drop the NaN from the uniques of the values.
Changed in version 1.1.2.
Hint to the hashtable sizer.
An integer ndarray that’s an indexer into uniques. uniques.take(codes) will have the same values as values.
The unique valid values. When values is Categorical, uniques is a Categorical. When values is some other pandas object, an Index is returned. Otherwise, a 1-D ndarray is returned.
Note
Even if there’s a missing value in values, uniques will not contain an entry for it.
See also
Discretize continuous-valued array.
Find the unique value in an array.
Examples
These examples all show factorize as a top-level method like pd.factorize(values). The results are identical for methods like Series.factorize().
With sort=True, the uniques will be sorted, and codes will be shuffled so that the relationship is the maintained.
Missing values are indicated in codes with na_sentinel (-1 by default). Note that missing values are never included in uniques.
Thus far, we’ve only factorized lists (which are internally coerced to NumPy arrays). When factorizing pandas objects, the type of uniques will differ. For Categoricals, a Categorical is returned.
Notice that 'b' is in uniques.categories, despite not being present in cat.values.
For all other pandas objects, an Index of the appropriate type is returned.
If NaN is in the values, and we want to include NaN in the uniques of the values, it can be achieved by setting na_sentinel=None.


Flags that apply to pandas objects.
New in version 1.2.0.
The object these flags are associated with.
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
Attributes
allows_duplicate_labels
Whether this object 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
Set global metadata on this object.
Set global flags on this object.
Examples


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.
Make a copy of input ndarray.
Name to be stored in the index.
See also
The base pandas Index type.
Index of numpy int/uint/float data.
Notes
An Index instance can only contain hashable objects.
Attributes
None
Methods
None


Convert categorical variable into dummy/indicator variables.
Data of which to get dummy indicators.
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.
If appending prefix, separator/delimiter to use. Or pass a list or dictionary as with prefix.
Add a column to indicate NaNs, if False NaNs are ignored.
Column names in the DataFrame to be encoded. If columns is None then all the columns with object or category dtype will be converted.
Whether the dummy-encoded columns should be backed by a SparseArray (True) or a regular NumPy array (False).
Whether to get k-1 dummies out of k categorical levels by removing the first level.
Data type for new columns. Only a single dtype is allowed.
Dummy-coded data.
See also
Convert Series to dummy codes.
Examples


Retrieves the value of the specified option.
Available options:
compute.[use_bottleneck, use_numba, use_numexpr]
display.[chop_threshold, colheader_justify, column_space, date_dayfirst, date_yearfirst, encoding, expand_frame_repr, float_format]
display.html.[border, table_schema, use_mathjax]
display.[large_repr]
display.latex.[escape, longtable, multicolumn, multicolumn_format, multirow, repr]
display.[max_categories, max_columns, max_colwidth, max_dir_items, max_info_columns, max_info_rows, max_rows, max_seq_items, memory_usage, min_rows, multi_sparse, notebook_repr_html, pprint_nest_depth, precision, show_dimensions]
display.unicode.[ambiguous_as_wide, east_asian_width]
display.[width]
io.excel.ods.[reader, writer]
io.excel.xls.[reader, writer]
io.excel.xlsb.[reader]
io.excel.xlsm.[reader, writer]
io.excel.xlsx.[reader, writer]
io.hdf.[default_format, dropna_table]
io.parquet.[engine]
io.sql.[engine]
mode.[chained_assignment, data_manager, sim_interactive, string_storage, use_inf_as_na, use_inf_as_null]
plotting.[backend]
plotting.matplotlib.[register_converters]
styler.format.[decimal, escape, formatter, na_rep, precision, thousands]
styler.html.[mathjax]
styler.latex.[environment, hrules, multicol_align, multirow_align]
styler.render.[encoding, max_columns, max_elements, max_rows, repr]
styler.sparse.[columns, index]
Regexp which should match a single option. Note: partial matches are supported for convenience, but unless you use the full option name (e.g. x.y.z.option_name), your code may break in future versions if new options with similar names are introduced.
Notes
The available options with its descriptions:
Use the bottleneck library to accelerate if it is installed, the default is True Valid values: False,True [default: True] [currently: True]
Use the numba engine option for select operations if it is installed, the default is False Valid values: False,True [default: False] [currently: False]
Use the numexpr library to accelerate computation if it is installed, the default is True Valid values: False,True [default: True] [currently: True]
if set to a float value, all float values smaller then the given threshold will be displayed as exactly 0 by repr and friends. [default: None] [currently: None]
Controls the justification of column headers. used by DataFrameFormatter. [default: right] [currently: right]
[default: 12] [currently: 12]
When True, prints and parses dates with the day first, eg 20/01/2005 [default: False] [currently: False]
When True, prints and parses dates with the year first, eg 2005/01/20 [default: False] [currently: False]
Defaults to the detected encoding of the console. Specifies the encoding to be used for strings returned by to_string, these are generally strings meant to be displayed on the console. [default: utf-8] [currently: utf-8]
Whether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if its width exceeds display.width. [default: True] [currently: True]
The callable should accept a floating point number and return a string with the desired format of the number. This is used in some places like SeriesFormatter. See formats.format.EngFormatter for an example. [default: None] [currently: None]
A border=value attribute is inserted in the <table> tag for the DataFrame HTML repr. [default: 1] [currently: 1]
Whether to publish a Table Schema representation for frontends that support it. (default: False) [default: False] [currently: False]
When True, Jupyter notebook will process table contents using MathJax, rendering mathematical expressions enclosed by the dollar symbol. (default: True) [default: True] [currently: True]
For DataFrames exceeding max_rows/max_cols, the repr (and HTML repr) can show a truncated table (the default from 0.13), or switch to the view from df.info() (the behaviour in earlier versions of pandas). [default: truncate] [currently: truncate]
This specifies if the to_latex method of a Dataframe uses escapes special characters. Valid values: False,True [default: True] [currently: True]
This specifies if the to_latex method of a Dataframe uses the longtable format. Valid values: False,True [default: False] [currently: False]
This specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: True] [currently: True]
This specifies if the to_latex method of a Dataframe uses multicolumns to pretty-print MultiIndex columns. Valid values: False,True [default: l] [currently: l]
This specifies if the to_latex method of a Dataframe uses multirows to pretty-print MultiIndex rows. Valid values: False,True [default: False] [currently: False]
Whether to produce a latex DataFrame representation for jupyter environments that support it. (default: False) [default: False] [currently: False]
This sets the maximum number of categories pandas should output when printing out a Categorical or a Series of dtype “category”. [default: 8] [currently: 8]
If max_cols is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. ‘None’ value means unlimited.
In case python/IPython is running in a terminal and large_repr equals ‘truncate’ this can be set to 0 and pandas will auto-detect the width of the terminal and print a truncated object which fits the screen width. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 0] [currently: 0]
The maximum width in characters of a column in the repr of a pandas data structure. When the column overflows, a “…” placeholder is embedded in the output. A ‘None’ value means unlimited. [default: 50] [currently: 50]
The number of items that will be added to dir(…). ‘None’ value means unlimited. Because dir is cached, changing this option will not immediately affect already existing dataframes until a column is deleted or added.
This is for instance used to suggest columns from a dataframe to tab completion. [default: 100] [currently: 100]
max_info_columns is used in DataFrame.info method to decide if per column information will be printed. [default: 100] [currently: 100]
df.info() will usually show null-counts for each column. For large frames this can be quite slow. max_info_rows and max_info_cols limit this null check only to frames with smaller dimensions than specified. [default: 1690785] [currently: 1690785]
If max_rows is exceeded, switch to truncate view. Depending on large_repr, objects are either centrally truncated or printed as a summary view. ‘None’ value means unlimited.
In case python/IPython is running in a terminal and large_repr equals ‘truncate’ this can be set to 0 and pandas will auto-detect the height of the terminal and print a truncated object which fits the screen height. The IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to do correct auto-detection. [default: 60] [currently: 60]
When pretty-printing a long sequence, no more then max_seq_items will be printed. If items are omitted, they will be denoted by the addition of “…” to the resulting string.
If set to None, the number of items to be printed is unlimited. [default: 100] [currently: 100]
This specifies if the memory usage of a DataFrame should be displayed when df.info() is called. Valid values True,False,’deep’ [default: True] [currently: True]
The numbers of rows to show in a truncated view (when max_rows is exceeded). Ignored when max_rows is set to None or 0. When set to None, follows the value of max_rows. [default: 10] [currently: 10]
“sparsify” MultiIndex display (don’t display repeated elements in outer levels within groups) [default: True] [currently: True]
When True, IPython notebook will use html representation for pandas objects (if it is available). [default: True] [currently: True]
Controls the number of nested levels to process when pretty-printing [default: 3] [currently: 3]
Floating point output precision in terms of number of places after the decimal, for regular formatting as well as scientific notation. Similar to precision in numpy.set_printoptions(). [default: 6] [currently: 6]
Whether to print out dimensions at the end of DataFrame repr. If ‘truncate’ is specified, only print out the dimensions if the frame is truncated (e.g. not display all rows and/or columns) [default: truncate] [currently: truncate]
Whether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]
Whether to use the Unicode East Asian Width to calculate the display text width. Enabling this may affect to the performance (default: False) [default: False] [currently: False]
Width of the display in characters. In case python/IPython is running in a terminal this can be set to None and pandas will correctly auto-detect the width. Note that the IPython notebook, IPython qtconsole, or IDLE do not run in a terminal and hence it is not possible to correctly detect the width. [default: 80] [currently: 80]
The default Excel reader engine for ‘ods’ files. Available options: auto, odf. [default: auto] [currently: auto]
The default Excel writer engine for ‘ods’ files. Available options: auto, odf. [default: auto] [currently: auto]
The default Excel reader engine for ‘xls’ files. Available options: auto, xlrd. [default: auto] [currently: auto]
The default Excel writer engine for ‘xls’ files. Available options: auto, xlwt. [default: auto] [currently: auto] (Deprecated, use `` instead.)
The default Excel reader engine for ‘xlsb’ files. Available options: auto, pyxlsb. [default: auto] [currently: auto]
The default Excel reader engine for ‘xlsm’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]
The default Excel writer engine for ‘xlsm’ files. Available options: auto, openpyxl. [default: auto] [currently: auto]
The default Excel reader engine for ‘xlsx’ files. Available options: auto, xlrd, openpyxl. [default: auto] [currently: auto]
The default Excel writer engine for ‘xlsx’ files. Available options: auto, openpyxl, xlsxwriter. [default: auto] [currently: auto]
default format writing format, if None, then put will default to ‘fixed’ and append will default to ‘table’ [default: None] [currently: None]
drop ALL nan rows when appending to a table [default: False] [currently: False]
The default parquet reader/writer engine. Available options: ‘auto’, ‘pyarrow’, ‘fastparquet’, the default is ‘auto’ [default: auto] [currently: auto]
The default sql reader/writer engine. Available options: ‘auto’, ‘sqlalchemy’, the default is ‘auto’ [default: auto] [currently: auto]
Raise an exception, warn, or no action if trying to use chained assignment, The default is warn [default: warn] [currently: warn]
Internal data manager type; can be “block” or “array”. Defaults to “block”, unless overridden by the ‘PANDAS_DATA_MANAGER’ environment variable (needs to be set before pandas is imported). [default: block] [currently: block]
Whether to simulate interactive mode for purposes of testing [default: False] [currently: False]
The default storage for StringDtype. [default: python] [currently: python]
True means treat None, NaN, INF, -INF as NA (old way), False means None and NaN are null, but INF, -INF are not NA (new way). [default: False] [currently: False]
use_inf_as_null had been deprecated and will be removed in a future version. Use use_inf_as_na instead. [default: False] [currently: False] (Deprecated, use mode.use_inf_as_na instead.)
The plotting backend to use. The default value is “matplotlib”, the backend provided with pandas. Other backends can be specified by providing the name of the module that implements the backend. [default: matplotlib] [currently: matplotlib]
Whether to register converters with matplotlib’s units registry for dates, times, datetimes, and Periods. Toggling to False will remove the converters, restoring any converters that pandas overwrote. [default: auto] [currently: auto]
The character representation for the decimal separator for floats and complex. [default: .] [currently: .]
Whether to escape certain characters according to the given context; html or latex. [default: None] [currently: None]
A formatter object to be used as default within Styler.format. [default: None] [currently: None]
The string representation for values identified as missing. [default: None] [currently: None]
The precision for floats and complex numbers. [default: 6] [currently: 6]
The character representation for thousands separator for floats, int and complex. [default: None] [currently: None]
If False will render special CSS classes to table attributes that indicate Mathjax will not be used in Jupyter Notebook. [default: True] [currently: True]
The environment to replace \begin{table}. If “longtable” is used results in a specific longtable environment format. [default: None] [currently: None]
Whether to add horizontal rules on top and bottom and below the headers. [default: False] [currently: False]
The specifier for horizontal alignment of sparsified LaTeX multicolumns. Pipe decorators can also be added to non-naive values to draw vertical rules, e.g. “|r” will draw a rule on the left side of right aligned merged cells. [default: r] [currently: r]
The specifier for vertical alignment of sparsified LaTeX multirows. [default: c] [currently: c]
The encoding used for output HTML and LaTeX files. [default: utf-8] [currently: utf-8]
The maximum number of columns that will be rendered. May still be reduced to satsify max_elements, which takes precedence. [default: None] [currently: None]
The maximum number of data-cell (<td>) elements that will be rendered before trimming will occur over columns, rows or both if needed. [default: 262144] [currently: 262144]
The maximum number of rows that will be rendered. May still be reduced to satsify max_elements, which takes precedence. [default: None] [currently: None]
Determine which output to use in Jupyter Notebook in {“html”, “latex”}. [default: html] [currently: html]
Whether to sparsify the display of hierarchical columns. Setting to False will display each explicit level element in a hierarchical key for each column. [default: True] [currently: True]
Whether to sparsify the display of a hierarchical index. Setting to False will display each explicit level element in a hierarchical key for each row. [default: True] [currently: True]


A Grouper allows the user to specify a groupby instruction for an object.
This specification will select a column via the key parameter, or if the level and/or axis parameters are given, a level of the index of the target object.
If axis and/or level are passed as keywords to both Grouper and groupby, the values passed to Grouper take precedence.
Groupby key, which selects the grouping column of the target.
The level for the target index.
This will groupby the specified frequency if the target selection (via key or level) is a datetime-like object. For full specification of available frequencies, please see here.
Number/name of the axis.
Whether to sort the resulting labels.
Closed end of interval. Only when freq parameter is passed.
Interval boundary to use for labeling. Only when freq parameter is passed.
If grouper is PeriodIndex and freq parameter is passed.
Only when freq parameter is passed. For frequencies that evenly subdivide 1 day, the “origin” of the aggregated intervals. For example, for ‘5min’ frequency, base could range from 0 through 4. Defaults to 0.
Deprecated since version 1.1.0: The new arguments that you should use are ‘offset’ or ‘origin’.
Only when freq parameter is passed.
Deprecated since version 1.1.0: loffset is only working for .resample(...) and not for Grouper (GH28302). However, loffset is also deprecated for .resample(...) See: DataFrame.resample
The timestamp on which to adjust the grouping. The timezone of origin must match the timezone of the index. If string, must be one of the following:
‘epoch’: origin is 1970-01-01
‘start’: origin is the first value of the timeseries
‘start_day’: origin is the first day at midnight of the timeseries
New in version 1.1.0.
‘end’: origin is the last value of the timeseries
‘end_day’: origin is the ceiling midnight of the last day
New in version 1.3.0.
An offset timedelta added to the origin.
New in version 1.1.0.
If True, and if group keys contain NA values, NA values together with row/column will be dropped. If False, NA values will also be treated as the key in groups.
New in version 1.2.0.
Examples
Syntactic sugar for df.groupby('A')
Specify a resample operation on the column ‘Publish date’
If you want to adjust the start of the bins based on a fixed timestamp:
If you want to adjust the start of the bins with an offset Timedelta, the two following lines are equivalent:
To replace the use of the deprecated base argument, you can now use offset, in this example it is equivalent to have base=2:
Attributes
ax
groups


Append to Table in file. Node must already exist and be Table format.
Format to use when storing object in HDFStore. Value can be one of:
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 the input data to the existing.
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.
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


Retrieve pandas object stored in file.
Same type as object stored in file.


Return a list of all the top-level nodes.
Each node returned is not a pandas storage object.
List of objects.


Print detailed information on the store.


Return a list of keys corresponding to objects stored in HDFStore.
When kind equals ‘pandas’ return pandas objects. When kind equals ‘native’ return native HDF5 Table objects.
New in version 1.1.0.
List of ABSOLUTE path-names (e.g. have the leading ‘/’).


Store object in HDFStore.
Format to use when storing object in HDFStore. Value can be one of:
Fixed format. Fast writing/reading. Not-appendable, nor searchable.
Table format. Write as a PyTables Table structure which may perform worse but allow more flexible operations like searching / selecting subsets of the data.
This will force Table format, append the input data to the existing.
List of columns to create as data columns, or True to use all columns. See here.
Provide an encoding for strings.
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.


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.
Object being retrieved from file.
List of Term (or convertible) objects, optional.
Row number to start selection.
Row number to stop selection.
A list of columns that if not None, will limit the return columns.
Returns an iterator.
Number or rows to include in iteration, return an iterator.
Should automatically close the store when finished.
Retrieved object from file.


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.
Group where to start walking.
Full path to a group (without trailing ‘/’).
Names (strings) of the groups contained in path.
Names (strings) of the pandas objects contained in path.


Immutable sequence used for indexing and alignment. The basic object storing axis labels for all pandas objects.
If dtype is None, we find the dtype that best fits the data. If an actual dtype is provided, we coerce to that dtype if it’s safe. Otherwise, an error will be raised.
Make a copy of input ndarray.
Name to be stored in the index.
When True, attempt to create a MultiIndex if possible.
See also
Index implementing a monotonic integer range.
Index of Categorical s.
A multi-level, or hierarchical Index.
An Index of Interval s.
Index of datetime64 data.
Index of timedelta64 data.
Index of Period data.
Index of numpy int/uint/float data.
Index of purely int64 labels (deprecated).
Index of purely uint64 labels (deprecated).
Index of purely float64 labels (deprecated).
Notes
An Index instance can only contain hashable objects
Examples
Attributes
T
Return the transpose, which is by definition self.
array
The ExtensionArray of the data backing this Series or Index.
asi8
Integer representation of the values.
dtype
Return the dtype object of the underlying data.
has_duplicates
Check if the Index has duplicate values.
hasnans
Return True if there are any NaNs.
inferred_type
Return a string of the type inferred from the values.
is_all_dates
Whether or not the index values only consist of dates.
is_monotonic
Alias for is_monotonic_increasing.
is_monotonic_decreasing
Return if the index is monotonic decreasing (only equal or decreasing) values.
is_monotonic_increasing
Return if the index is monotonic increasing (only equal or increasing) values.
is_unique
Return if the index has unique values.
name
Return Index or MultiIndex name.
nbytes
Return the number of bytes in the underlying data.
ndim
Number of dimensions of the underlying data, by definition 1.
nlevels
Number of levels.
shape
Return a tuple of the shape of the underlying data.
size
Return the number of elements in the underlying data.
values
Return an array representing the data in the Index.
empty
names
Methods
all(*args, **kwargs)
Return whether all elements are Truthy.
any(*args, **kwargs)
Return whether any element is Truthy.
append(other)
Append a collection of Index options together.
argmax([axis, skipna])
Return int position of the largest value in the Series.
argmin([axis, skipna])
Return int position of the smallest value in the Series.
argsort(*args, **kwargs)
Return the integer indices that would sort the index.
asof(label)
Return the label from the index, or, if not present, the previous one.
asof_locs(where, mask)
Return the locations (indices) of labels in the index.
astype(dtype[, copy])
Create an Index with values cast to dtypes.
copy([name, deep, dtype, names])
Make a copy of this object.
delete(loc)
Make new Index with passed location(-s) deleted.
difference(other[, sort])
Return a new Index with elements of index not in other.
drop(labels[, errors])
Make new Index with passed list of labels deleted.
drop_duplicates([keep])
Return Index with duplicate values removed.
droplevel([level])
Return index with requested level(s) removed.
dropna([how])
Return Index without NA/NaN values.
duplicated([keep])
Indicate duplicate index values.
equals(other)
Determine if two Index object are equal.
factorize([sort, na_sentinel])
Encode the object as an enumerated type or categorical variable.
fillna([value, downcast])
Fill NA/NaN values with the specified value.
format([name, formatter, na_rep])
Render a string representation of the Index.
get_indexer(target[, method, limit, tolerance])
Compute indexer and mask for new index given the current index.
get_indexer_for(target)
Guaranteed return of an indexer even when non-unique.
get_indexer_non_unique(target)
Compute indexer and mask for new index given the current index.
get_level_values(level)
Return an Index of values for requested level.
get_loc(key[, method, tolerance])
Get integer location, slice or boolean mask for requested label.
get_slice_bound(label, side[, kind])
Calculate slice bound that corresponds to given label.
get_value(series, key)
Fast lookup of value from 1-dimensional ndarray.
groupby(values)
Group the index labels by a given array of values.
holds_integer()
Whether the type is an integer type.
identical(other)
Similar to equals, but checks that object attributes and types are also equal.
insert(loc, item)
Make new Index inserting new item at location.
intersection(other[, sort])
Form the intersection of two Index objects.
is_(other)
More flexible, faster check like is but that works through views.
is_boolean()
Check if the Index only consists of booleans.
is_categorical()
Check if the Index holds categorical data.
is_floating()
Check if the Index is a floating type.
is_integer()
Check if the Index only consists of integers.
is_interval()
Check if the Index holds Interval objects.
is_mixed()
Check if the Index holds data with mixed data types.
is_numeric()
Check if the Index only consists of numeric data.
is_object()
Check if the Index is of the object dtype.
is_type_compatible(kind)
Whether the index type is compatible with the provided type.
isin(values[, level])
Return a boolean array where the index values are in values.
isna()
Detect missing values.
isnull()
Detect missing values.
item()
Return the first element of the underlying data as a Python scalar.
join(other[, how, level, return_indexers, sort])
Compute join_index and indexers to conform data structures to the new index.
map(mapper[, na_action])
Map values using an input mapping or function.
max([axis, skipna])
Return the maximum value of the Index.
memory_usage([deep])
Memory usage of the values.
min([axis, skipna])
Return the minimum value of the Index.
notna()
Detect existing (non-missing) values.
notnull()
Detect existing (non-missing) values.
nunique([dropna])
Return number of unique elements in the object.
putmask(mask, value)
Return a new Index of the values set with the mask.
ravel([order])
Return an ndarray of the flattened values of the underlying data.
reindex(target[, method, level, limit, ...])
Create index with target's values.
rename(name[, inplace])
Alter Index or MultiIndex name.
repeat(repeats[, axis])
Repeat elements of a Index.
searchsorted(value[, side, sorter])
Find indices where elements should be inserted to maintain order.
set_names(names[, level, inplace])
Set Index or MultiIndex name.
set_value(arr, key, value)
(DEPRECATED) Fast lookup of value from 1-dimensional ndarray.
shift([periods, freq])
Shift index by desired number of time frequency increments.
slice_indexer([start, end, step, kind])
Compute the slice indexer for input labels and step.
slice_locs([start, end, step, kind])
Compute slice locations for input labels.
sort(*args, **kwargs)
Use sort_values instead.
sort_values([return_indexer, ascending, ...])
Return a sorted copy of the index.
sortlevel([level, ascending, sort_remaining])
For internal compatibility with the Index API.
str
alias of pandas.core.strings.accessor.StringMethods
symmetric_difference(other[, result_name, sort])
Compute the symmetric difference of two Index objects.
take(indices[, axis, allow_fill, fill_value])
Return a new Index of the values selected by the indices.
to_flat_index()
Identity method.
to_frame([index, name])
Create a DataFrame with a column containing the Index.
to_list()
Return a list of the values.
to_native_types([slicer])
(DEPRECATED) Format specified values of self and return them.
to_numpy([dtype, copy, na_value])
A NumPy ndarray representing the values in this Series or Index.
to_series([index, name])
Create a Series with both index and values equal to the index keys.
tolist()
Return a list of the values.
transpose(*args, **kwargs)
Return the transpose, which is by definition self.
union(other[, sort])
Form the union of two Index objects.
unique([level])
Return unique values in the index.
value_counts([normalize, sort, ascending, ...])
Return a Series containing counts of unique values.
where(cond[, other])
Replace values where the condition is False.
view


Return whether all elements are Truthy.
Required for compatibility with numpy.
Required for compatibility with numpy.
A single element array-like may be converted to bool.
See also
Return whether any element in an Index is True.
Return whether any element in a Series is True.
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.
False, because 0 is considered False.


Return whether any element is Truthy.
Required for compatibility with numpy.
Required for compatibility with numpy.
A single element array-like may be converted to bool.
See also
Return whether all elements are True.
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


Append a collection of Index options together.


Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
Dummy argument for consistency with Series.
Exclude NA/null values when showing the result.
Additional arguments and keywords for compatibility with NumPy.
Row position of the maximum value.
See also
Return position of the maximum value.
Return position of the minimum value.
Equivalent method for numpy arrays.
Return index label of the maximum values.
Return index label of the minimum values.
Examples
Consider dataset containing cereal calories
The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.


Return int position of the smallest value in the Series.
If the minimum is achieved in multiple locations, the first row position is returned.
Dummy argument for consistency with Series.
Exclude NA/null values when showing the result.
Additional arguments and keywords for compatibility with NumPy.
Row position of the minimum value.
See also
Return position of the minimum value.
Return position of the maximum value.
Equivalent method for numpy arrays.
Return index label of the maximum values.
Return index label of the minimum values.
Examples
Consider dataset containing cereal calories
The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.


Return the integer indices that would sort the index.
Passed to numpy.ndarray.argsort.
Passed to numpy.ndarray.argsort.
Integer indices that would sort the index if used as an indexer.
See also
Similar method for NumPy arrays.
Return sorted copy of Index.
Examples


The ExtensionArray of the data backing this Series or Index.
An ExtensionArray of the values stored within. For extension types, this is the actual array. For NumPy native types, this is a thin (no copy) wrapper around numpy.ndarray.
.array differs .values which may require converting the data to a different form.
See also
Similar method that always returns a NumPy array.
Similar method that always returns a NumPy array.
Notes
This table lays out the different array types for each extension dtype within pandas.
dtype
array type
category
Categorical
period
PeriodArray
interval
IntervalArray
IntegerNA
IntegerArray
string
StringArray
boolean
BooleanArray
datetime64[ns, tz]
DatetimeArray
For any 3rd-party extension types, the array type will be an ExtensionArray.
For all remaining dtypes .array will be a arrays.NumpyExtensionArray wrapping the actual ndarray stored within. If you absolutely need a NumPy array (possibly with copying / coercing data), then use Series.to_numpy() instead.
Examples
For regular NumPy types like int, and float, a PandasArray is returned.
For extension types, like Categorical, the actual ExtensionArray is returned


Integer representation of the values.
An ndarray with int64 dtype.


Return the label from the index, or, if not present, the previous one.
Assuming that the index is sorted, return the passed index label if it is in the index, or return the previous index label if the passed one is not in the index.
The label up to which the method returns the latest index label.
The passed label if it is in the index. The previous label if the passed label is not in the sorted index or NaN if there is no such label.
See also
Return the latest value in a Series up to the passed index.
Perform an asof merge (similar to left join but it matches on nearest key rather than equal key).
An asof is a thin wrapper around get_loc with method=’pad’.
Examples
Index.asof returns the latest index label up to the passed label.
If the label is in the index, the method returns the passed label.
If all of the labels in the index are later than the passed label, NaN is returned.
If the index is not sorted, an error is raised.


Return the locations (indices) of labels in the index.
As in the asof function, if the label (a particular entry in where) is not in the index, the latest index label up to the passed label is chosen and its index returned.
If all of the labels in the index are later than a label in where, -1 is returned.
mask is used to ignore NA values in the index during calculation.
An Index consisting of an array of timestamps.
Array of booleans denoting where values in the original data are not NA.
An array of locations (indices) of the labels from the Index which correspond to the return values of the asof function for every element in where.


Create an Index with values cast to dtypes.
The class of a new Index is determined by dtype. When conversion is impossible, a TypeError exception is raised.
Note that any signed integer dtype is treated as 'int64', and any unsigned integer dtype is treated as 'uint64', regardless of the size.
By default, astype always returns a newly allocated object. If copy is set to False and internal requirements on dtype are satisfied, the original data is used to create a new Index or the original Index is returned.
Index with values cast to specified dtype.


Make a copy of this object.
Name and dtype sets those attributes on the new object.
Set name for new object.
Set dtype for new object.
Deprecated since version 1.2.0: use astype method instead.
Kept for compatibility with MultiIndex. Should not be used.
Deprecated since version 1.4.0: use name instead.
Index refer to new object which is a copy of this object.
Notes
In most cases, there should be no functional difference from using deep, but if deep is passed it will attempt to deepcopy.


Make new Index with passed location(-s) deleted.
Location of item(-s) which will be deleted. Use a list of locations to delete more than one value at the same time.
Will be same type as self, except for RangeIndex.
See also
Delete any rows and column from NumPy array (ndarray).
Examples


Return a new Index with elements of index not in other.
This is the set difference of two Index objects.
Whether to sort the resulting index. By default, the values are attempted to be sorted, but any TypeError from incomparable elements is caught by pandas.
None : Attempt to sort the result, but catch any TypeErrors from comparing incomparable elements.
False : Do not sort the result.
Examples


Make new Index with passed list of labels deleted.
If ‘ignore’, suppress error and existing labels are dropped.
Will be same type as self, except for RangeIndex.
If not all of the labels are found in the selected axis


Return Index with duplicate values removed.
‘first’ : Drop duplicates except for the first occurrence.
‘last’ : Drop duplicates except for the last occurrence.
False : Drop all duplicates.
See also
Equivalent method on Series.
Equivalent method on DataFrame.
Related method on Index, indicating duplicate Index values.
Examples
Generate an pandas.Index with duplicate values.
The keep parameter controls which duplicate values are removed. The value ‘first’ keeps the first occurrence for each set of duplicated entries. The default value of keep is ‘first’.
The value ‘last’ keeps the last occurrence for each set of duplicated entries.
The value False discards all sets of duplicated entries.


Return index with requested level(s) removed.
If resulting index has only 1 level left, the result will be of Index type, not MultiIndex.
If a string is given, must be the name of a level If list-like, elements must be names or indexes of levels.
Examples


Return Index without NA/NaN values.
If the Index is a MultiIndex, drop the value when any or all levels are NaN.


Return the dtype object of the underlying data.


Indicate duplicate index values.
Duplicated values are indicated as True values in the resulting array. Either all duplicates, all except the first, or all except the last occurrence of duplicates can be indicated.
The value or values in a set of duplicates to mark as missing.
‘first’ : Mark duplicates as True except for the first occurrence.
‘last’ : Mark duplicates as True except for the last occurrence.
False : Mark all duplicates as True.
See also
Equivalent method on pandas.Series.
Equivalent method on pandas.DataFrame.
Remove duplicate values from Index.
Examples
By default, for each set of duplicated values, the first occurrence is set to False and all others to True:
which is equivalent to
By using ‘last’, the last occurrence of each set of duplicated values is set on False and all others on True:
By setting keep on False, all duplicates are True:


Determine if two Index object are equal.
The things that are being compared are:
The elements inside the Index object.
The order of the elements inside the Index object.
The other object to compare against.
True if “other” is an Index and it has the same elements and order as the calling index; False otherwise.
Examples
The elements inside are compared
The order is compared
The dtype is not compared


Encode the object as an enumerated type or categorical variable.
This method is useful for obtaining a numeric representation of an array when all that matters is identifying distinct values. factorize is available as both a top-level function pandas.factorize(), and as a method Series.factorize() and Index.factorize().
Sort uniques and shuffle codes to maintain the relationship.
Value to mark “not found”. If None, will not drop the NaN from the uniques of the values.
Changed in version 1.1.2.
An integer ndarray that’s an indexer into uniques. uniques.take(codes) will have the same values as values.
The unique valid values. When values is Categorical, uniques is a Categorical. When values is some other pandas object, an Index is returned. Otherwise, a 1-D ndarray is returned.
Note
Even if there’s a missing value in values, uniques will not contain an entry for it.
See also
Discretize continuous-valued array.
Find the unique value in an array.
Examples
These examples all show factorize as a top-level method like pd.factorize(values). The results are identical for methods like Series.factorize().
With sort=True, the uniques will be sorted, and codes will be shuffled so that the relationship is the maintained.
Missing values are indicated in codes with na_sentinel (-1 by default). Note that missing values are never included in uniques.
Thus far, we’ve only factorized lists (which are internally coerced to NumPy arrays). When factorizing pandas objects, the type of uniques will differ. For Categoricals, a Categorical is returned.
Notice that 'b' is in uniques.categories, despite not being present in cat.values.
For all other pandas objects, an Index of the appropriate type is returned.
If NaN is in the values, and we want to include NaN in the uniques of the values, it can be achieved by setting na_sentinel=None.


Fill NA/NaN values with the specified value.
Scalar value to use to fill holes (e.g. 0). This value cannot be a list-likes.
A dict of item->dtype of what to downcast if possible, or the string ‘infer’ which will try to downcast to an appropriate equal type (e.g. float64 to int64 if possible).
See also
Fill NaN values of a DataFrame.
Fill NaN Values of a Series.


Render a string representation of the Index.


Compute indexer and mask for new index given the current index. The indexer should be then used as an input to ndarray.take to align the current data to the new index.
default: exact matches only.
pad / ffill: find the PREVIOUS index value if no exact match.
backfill / bfill: use NEXT index value if no exact match
nearest: use the NEAREST index value if no exact match. Tied distances are broken by preferring the larger index value.
Maximum number of consecutive labels in target to match for inexact matches.
Maximum distance between original and new labels for inexact matches. The values of the index at the matching locations must satisfy the equation abs(index[indexer] - target) <= tolerance.
Tolerance may be a scalar value, which applies the same tolerance to all values, or list-like, which applies variable tolerance per element. List-like includes list, tuple, array, Series, and must be the same size as the index and its dtype must exactly match the index’s type.
Integers from 0 to n - 1 indicating that the index at these positions matches the corresponding target values. Missing values in the target are marked by -1.
Notes
Returns -1 for unmatched values, for further explanation see the example below.
Examples
Notice that the return value is an array of locations in index and x is marked by -1, as it is not in index.


Guaranteed return of an indexer even when non-unique.
This dispatches to get_indexer or get_indexer_non_unique as appropriate.
List of indices.
Examples


Compute indexer and mask for new index given the current index. The indexer should be then used as an input to ndarray.take to align the current data to the new index.
Integers from 0 to n - 1 indicating that the index at these positions matches the corresponding target values. Missing values in the target are marked by -1.
An indexer into the target of the values not found. These correspond to the -1 in the indexer array.


Return an Index of values for requested level.
This is primarily useful to get an individual level of values from a MultiIndex, but is provided on Index as well for compatibility.
It is either the integer position or the name of the level.
Calling object, as there is only one level in the Index.
See also
Get values for a level of a MultiIndex.
Notes
For Index, level should be 0, since there are no multiple levels.
Examples
Get level values by supplying level as integer:


Get integer location, slice or boolean mask for requested label.
default: exact matches only.
pad / ffill: find the PREVIOUS index value if no exact match.
backfill / bfill: use NEXT index value if no exact match
nearest: use the NEAREST index value if no exact match. Tied distances are broken by preferring the larger index value.
Maximum distance from index value for inexact matches. The value of the index at the matching location must satisfy the equation abs(index[loc] - key) <= tolerance.
Examples


Calculate slice bound that corresponds to given label.
Returns leftmost (one-past-the-rightmost if side=='right') position of given label.
Deprecated since version 1.4.0.
Index of label.


Fast lookup of value from 1-dimensional ndarray.
Only use this if you know what you’re doing.


Group the index labels by a given array of values.
Values used to determine the groups.
{group name -> group labels}


Check if the Index has duplicate values.
Whether or not the Index has duplicate values.
Examples


Return True if there are any NaNs.
Enables various performance speedups.


Similar to equals, but checks that object attributes and types are also equal.
If two Index objects have equal elements and same type True, otherwise False.


Return a string of the type inferred from the values.


Make new Index inserting new item at location.
Follows Python numpy.insert semantics for negative values.


Form the intersection of two Index objects.
This returns a new Index with elements common to the index and other.
Whether to sort the resulting index.
False : do not sort the result.
None : sort the result, except when self and other are equal or when the values cannot be compared.
Examples


More flexible, faster check like is but that works through views.
Note: this is not the same as Index.identical(), which checks that metadata is also the same.
Other object to compare against.
True if both have same underlying data, False otherwise.
See also
Works like Index.is_ but also checks metadata.


Whether or not the index values only consist of dates.


Check if the Index only consists of booleans.
Whether or not the Index only consists of booleans.
See also
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Check if the Index holds categorical data.
True if the Index is categorical.
See also
Index for categorical data.
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Check if the Index is a floating type.
The Index may consist of only floats, NaNs, or a mix of floats, integers, or NaNs.
Whether or not the Index only consists of only consists of floats, NaNs, or a mix of floats, integers, or NaNs.
See also
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Check if the Index only consists of integers.
Whether or not the Index only consists of integers.
See also
Check if the Index only consists of booleans.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Check if the Index holds Interval objects.
Whether or not the Index holds Interval objects.
See also
Index for Interval objects.
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds data with mixed data types.
Examples


Check if the Index holds data with mixed data types.
Whether or not the Index holds data with mixed data types.
See also
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Examples


Return if the index is monotonic decreasing (only equal or decreasing) values.
Examples


Return if the index is monotonic increasing (only equal or increasing) values.
Examples


Check if the Index only consists of numeric data.
Whether or not the Index only consists of numeric data.
See also
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index is of the object dtype.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Check if the Index is of the object dtype.
Whether or not the Index is of the object dtype.
See also
Check if the Index only consists of booleans.
Check if the Index only consists of integers.
Check if the Index is a floating type.
Check if the Index only consists of numeric data.
Check if the Index holds categorical data.
Check if the Index holds Interval objects.
Check if the Index holds data with mixed data types.
Examples


Whether the index type is compatible with the provided type.


Return a boolean array where the index values are in values.
Compute boolean array of whether each index value is found in the passed set of values. The length of the returned boolean array matches the length of the index.
Sought values.
Name or position of the index level to use (if the index is a MultiIndex).
NumPy array of boolean values.
See also
Same for Series.
Same method for DataFrames.
Notes
In the case of MultiIndex you must either specify values as a list-like object containing tuples that are the same length as the number of levels, or specify level. Otherwise it will raise a ValueError.
If level is specified:
if it is the name of one and only one index level, use that level;
otherwise it should be a number indicating level position.
Examples
Check whether each index value in a list of values.
Check whether the strings in the ‘color’ level of the MultiIndex are in a list of colors.
To check across the levels of a MultiIndex, pass a list of tuples:
For a DatetimeIndex, string values in values are converted to Timestamps.


Detect missing values.
Return a boolean same-sized object indicating if the values are NA. NA values, such as None, numpy.NaN or pd.NaT, get mapped to True values. Everything else get mapped to False values. Characters such as empty strings ‘’ or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True).
A boolean array of whether my values are NA.
See also
Boolean inverse of isna.
Omit entries with missing values.
Top-level isna.
Detect missing values in Series object.
Examples
Show which entries in a pandas.Index are NA. The result is an array.
Empty strings are not considered NA values. None is considered an NA value.
For datetimes, NaT (Not a Time) is considered as an NA value.


Return the first element of the underlying data as a Python scalar.
The first element of %(klass)s.
If the data is not length-1.


Compute join_index and indexers to conform data structures to the new index.
Sort the join keys lexicographically in the result Index. If False, the order of the join keys depends on the join type (how keyword).


Map values using an input mapping or function.
Mapping correspondence.
If ‘ignore’, propagate NA values, without passing them to the mapping correspondence.
The output of the mapping function applied to the index. If the function returns a tuple with more than one element a MultiIndex will be returned.


Return the maximum value of the Index.
For compatibility with NumPy. Only 0 or None are allowed.
Exclude NA/null values when showing the result.
Additional arguments and keywords for compatibility with NumPy.
Maximum value.
See also
Return the minimum value in an Index.
Return the maximum value in a Series.
Return the maximum values in a DataFrame.
Examples
For a MultiIndex, the maximum is determined lexicographically.


Memory usage of the values.
Introspect the data deeply, interrogate object dtypes for system-level memory consumption.
See also
Total bytes consumed by the elements of the array.
Notes
Memory usage does not include memory consumed by elements that are not components of the array if deep=False or if used on PyPy


Return the minimum value of the Index.
Dummy argument for consistency with Series.
Exclude NA/null values when showing the result.
Additional arguments and keywords for compatibility with NumPy.
Minimum value.
See also
Return the maximum value of the object.
Return the minimum value in a Series.
Return the minimum values in a DataFrame.
Examples
For a MultiIndex, the minimum is determined lexicographically.


Return the number of bytes in the underlying data.


Number of dimensions of the underlying data, by definition 1.


Detect existing (non-missing) values.
Return a boolean same-sized object indicating if the values are not NA. Non-missing values get mapped to True. Characters such as empty strings '' or numpy.inf are not considered NA values (unless you set pandas.options.mode.use_inf_as_na = True). NA values, such as None or numpy.NaN, get mapped to False values.
Boolean array to indicate which entries are not NA.
See also
Alias of notna.
Inverse of notna.
Top-level notna.
Examples
Show which entries in an Index are not NA. The result is an array.
Empty strings are not considered NA values. None is considered a NA value.


Return number of unique elements in the object.
Excludes NA values by default.
Don’t include NaN in the count.
See also
Method nunique for DataFrame.
Count non-NA/null observations in the Series.
Examples


Return a new Index of the values set with the mask.
See also
Changes elements of an array based on conditional and input values.


Return an ndarray of the flattened values of the underlying data.
Flattened array.
See also
Return a flattened array.


Create index with target’s values.
default: exact matches only.
pad / ffill: find the PREVIOUS index value if no exact match.
backfill / bfill: use NEXT index value if no exact match
nearest: use the NEAREST index value if no exact match. Tied distances are broken by preferring the larger index value.
Level of multiindex.
Maximum number of consecutive labels in target to match for inexact matches.
Maximum distance between original and new labels for inexact matches. The values of the index at the matching locations must satisfy the equation abs(index[indexer] - target) <= tolerance.
Tolerance may be a scalar value, which applies the same tolerance to all values, or list-like, which applies variable tolerance per element. List-like includes list, tuple, array, Series, and must be the same size as the index and its dtype must exactly match the index’s type.
Resulting index.
Indices of output values in original index.
If method passed along with level.
If non-unique multi-index
If non-unique index and method or limit passed.
See also
Examples


Alter Index or MultiIndex name.
Able to set new names without level. Defaults to returning new index. Length of names must match number of levels in MultiIndex.
Name(s) to set.
Modifies the object directly, instead of creating a new Index or MultiIndex.
The same type as the caller or None if inplace=True.
See also
Able to set new names partially and by level.
Examples


Repeat elements of a Index.
Returns a new Index where each element of the current Index is repeated consecutively a given number of times.
The number of repetitions for each element. This should be a non-negative integer. Repeating 0 times will return an empty Index.
Must be None. Has no effect but is accepted for compatibility with numpy.
Newly created Index with repeated elements.
See also
Equivalent function for Series.
Similar method for numpy.ndarray.
Examples