What’s new in 3.2.0 (Month XX, 2027)#

These are the changes in pandas 3.2.0. See Release notes for a full changelog including other versions of pandas.

Enhancements#

enhancement1#

enhancement2#

Other enhancements#

Notable bug fixes#

These are bug fixes that might have notable behavior changes.

DataFrame.rank() ranks each column in its own dtype#

DataFrame.rank() with axis=0 cast the whole frame to one common dtype before ranking, so its result could differ from Series.rank() on the same column. Each column is now ranked on its own and the two agree. Besides retaining extension dtypes, this changes the ranks themselves for an ordered Categorical whose categories are not in the natural order of their values, and for integers above 2**53 in a frame whose common dtype was float64 (GH 52829, GH 15420).

In [1]: cat = pd.Categorical(
   ...:     ["b", "a", "c", "a"], categories=["c", "b", "a"], ordered=True
   ...: )

In [2]: df = pd.DataFrame({"a": cat})

Previous behavior:

In [3]: df.rank()["a"].tolist()
Out[3]: [3.0, 1.5, 4.0, 1.5]

New behavior:

In [3]: df.rank()["a"].tolist()
Out[3]: [2.0, 3.5, 1.0, 3.5]

Backwards incompatible API changes#

Increased minimum versions for dependencies#

Some minimum supported versions of dependencies were updated. If installed, we now require:

Package

Minimum Version

Required

Changed

X

X

For optional libraries the general recommendation is to use the latest version. The following table lists the lowest version per library that is currently being tested throughout the development of pandas. Optional libraries below the lowest tested version may still work, but are not considered supported.

Package

Minimum Version

Changed

tabulate

0.10.0

X

See Dependencies and Optional dependencies for more.

Other API changes#

  • Styler now displays missing float values as NaN rather than nan by default, matching DataFrame (GH 12710)

  • ExtensionArray now implements __array_function__. Code expecting numpy.concatenate() or numpy.delete() to return a NumPy array for ExtensionArray input, including _concat_same_type and delete implementations in ExtensionArray subclasses, may need updating, as may code mixing an ExtensionArray with another library’s __array_function__ arrays (GH 26380)

  • Index now displays missing float values as NaN rather than nan in its repr, matching Series and DataFrame (GH 64733)

  • Timedelta and to_timedelta() now raise ValueError for a string with a comma between digits outside the seconds field, such as "1,5 days" or "1,234 days", instead of ignoring the comma (GH 71877)

  • ExtensionArray._concat_same_type() now has an axis keyword (default 0); pandas only passes it for dtypes that support 2D, so existing implementations without it keep working (GH 47514)

  • Styler.to_excel() now omits the rows, columns, index and header levels, and names hidden with Styler.hide(), matching the other Styler output methods; hiding the whole index with MultiIndex columns now raises NotImplementedError, as index=False does (GH 42276)

  • DataFrame.copy() and Series.copy() with deep=True (the default), and ArrowExtensionArray.copy(), now copy pyarrow-backed data instead of sharing its memory, so a copy no longer keeps the original’s memory alive (GH 61930)

  • DataFrame.query() now raises a ValueError when the expression does not evaluate to a boolean array, instead of silently using the result as row labels; use DataFrame.loc for label selection (GH 8560)

  • range values are now displayed as range(0, 3) rather than as the tuple (0, 1, 2), matching Styler (GH 44799)

Deprecations#

deprecation1#

deprecation2#

Other deprecations#

Performance improvements#

Bug fixes#

Categorical#

Datetimelike#

Timedelta#

Timezones#

  • Bug in DataFrame.query() and DataFrame.eval() comparing a timezone-aware datetime column to a string without a UTC offset raising TypeError or returning incorrect results; the string is now localized to the column’s timezone, as in df["col"] < "2000-01-02" (GH 26236)

Numeric#

  • Bug in DataFrame.idxmax() with a nullable boolean column containing missing values returning the first False row instead of the first True row (GH 71833)

  • Bug in Series.skew() and Series.kurt() (and their DataFrame counterparts) on complex data discarding the imaginary part; these now raise TypeError (GH 43770)

  • Bug in Series.var() and Series.std() (and their DataFrame counterparts) returning very inaccurate results for large float32 data when bottleneck is installed (GH 70945)

  • Bug in arithmetic and comparison operations between integer and float32 data on large inputs computing in float32 instead of float64 when numexpr is installed, losing precision (GH 71272)

  • Bug in in-place arithmetic and logical operations (e.g. ser += other) upcasting the result or raising when other has index labels not in the left operand (GH 12755)

  • Bug in integer exponentiation (**, Series.pow(), DataFrame.pow()) on large inputs returning imprecise results, 0 for negative exponents, or an upcast dtype when numexpr is installed (GH 54546)

  • Fixed bug in Series.corr() with method="pearson" returning an inaccurate result for nearly-constant data, and 0.0 instead of NaN for some constant data (GH 59652)

  • Fixed bug in Series.isin(), DataFrame.isin(), and Index.isin() reporting false matches when values was a list of integers above 2**53 mixed with floats, NaN, or integers outside the int64 range, or a list of bytes ending in a null byte (GH 70217)

  • Fixed bug in Series.var(), Series.std(), and Series.sem() (and their DataFrame counterparts) returning inf or incorrect results for float16 dtypes when the variance or the number of values exceeded the float16 range; these now return float64 like Series.mean() (GH 41277)

Conversion#

Strings#

Interval#

Indexing#

  • Bug in Index where creating or converting to numpy string dtypes would raise NotImplementedError now raises TypeError (GH 50127)

  • Bug in DataFrame.__setitem__() silently corrupting the DataFrame when the key matched several columns and value was a timezone-aware datetime64 or period scalar, or a one-dimensional Series of either dtype; it now broadcasts across the matched columns as the other dtypes already did (GH 71078)

  • Bug in DataFrame.__setitem__() silently corrupting the DataFrame when the key matched several unique columns, e.g. a partial date string on DatetimeIndex columns; value now broadcasts across them (GH 71098)

  • Bug in DataFrame.__setitem__() silently corrupting the DataFrame, or dropping columns of value, when the key matched several columns (duplicate or MultiIndex columns) and value was a two-dimensional array without one column per matched column; it now raises ValueError (GH 68445)

  • Bug in DataFrame.__setitem__() with a key matching several columns and a one-dimensional extension array value (e.g. Int64) storing one array for all of them, so a later write to one column changed the others (GH 71098)

  • Bug in DataFrame.isetitem() with several positions silently corrupting the DataFrame when value was a scalar or a one-dimensional extension array such as Int64; a scalar now fills every selected column and the array raises ValueError (GH 71098)

  • Bug in DataFrame.isetitem() with several positions silently corrupting the DataFrame, or dropping columns of value, when an arraylike value did not have one column per position; it now raises ValueError (GH 68445)

  • Bug in DataFrame.loc() and DataFrame.at() setitem with a single row label adding a new column from a list-like value raising or setting the wrong value (GH 30649)

  • Bug in DataFrame.loc() and DataFrame.iloc() raising an exception when assigning values using zero-dimensional NumPy array indexers (GH 70256)

  • Bug in DataFrame.loc() and DataFrame.iloc() raising or flattening a 2D value (e.g. a list of lists) set into a single object cell of a mixed-dtype DataFrame (GH 69152)

  • Bug in DataFrame.loc() and DataFrame.iloc() setitem on a 1-column DataFrame with an extension dtype raising when the column key is an all-False boolean mask or an empty list-like (GH 70232)

  • Bug in DataFrame.loc() and Series.loc() raising KeyError for a True or False label present in an object-dtype Index or the first level of a MultiIndex (GH 50165)

  • Bug in DataFrame.loc() and Series.loc() setitem with an integer slice raising TypeError where the same .loc getitem succeeds, e.g. on an index of decimal.Decimal values (GH 70219)

  • Bug in DataFrame.loc() and Series.loc() slicing with an integer or float bound that is not in the index: an object-dtype index of numbers (e.g. decimal.Decimal) raised TypeError instead of slicing by sort order, and a non-monotonic index of non-string values raised TypeError instead of KeyError (GH 70295)

  • Bug in DataFrame.loc() and Series.loc() with a partial tuple key on a sorted MultiIndex ignoring the later levels of the key when a key element equals a level value of a different type, e.g. numpy.datetime64 on a level of datetime.date objects (GH 55969)

  • Bug in DataFrame.loc() where setting a scalar column with a DataFrame value failed to align indices properly (GH 58482)

  • Bug in Index.copy() treating a tuple name as a list of names (GH 19171)

  • Bug in Index.difference() dropping elements that are not in other when other was a DatetimeIndex, TimedeltaIndex or PeriodIndex and the elements were strings that parse to its values, or when other was an IntervalIndex and the elements were scalars contained in its intervals (GH 58971)

  • Bug in Series.where() and Series.mask() with a list other of nested tuples, such as [(("a", "b"), ("c", "d"))], silently returning wrong values (GH 43780)

  • Bug in comparison operators between an Index and itself with a nullable or ArrowDtype dtype returning a NumPy boolean array with False or True at missing positions instead of propagating NA, inconsistent with comparing against a copy of the same Index (GH 71022)

  • Bug in hash-based operations on object-dtype data (e.g. Series.isin(), factorize(), Index.get_loc() on a unique Index) inconsistently matching a key of a different type that compares equal to a value but hashes differently, such as "float64" and np.dtype("float64"); these now never match, as with a dict (GH 43581)

  • Bug in selecting, setting or dropping with a list of labels that are nested tuples, such as [(("a", "b"), ("c", "d"))], raising ValueError (GH 43780)

Missing#

MultiIndex#

I/O#

  • read_csv() with engine="pyarrow" now raises ValueError for the unsupported encoding_errors with bytes or file input instead of silently ignoring it (GH 71298)

  • Bug in DataFrame repr and DataFrame.to_string() where numeric column labels of differing widths were misaligned with their column’s values (GH 8300)

  • Bug in json_normalize() where a meta path not following record_path raised KeyError or silently returned a same-named field from the wrong object (GH 60254)

  • Bug in read_csv() silently misparsing non-ASCII thousands and decimal markers with the C engine; these now fall back to the Python engine with a errors.ParserWarning, or raise ValueError if engine="c" is explicitly specified (GH 71158)

  • Bug in read_csv() where a dtype given for a parse_dates column undid the date parsing, returning strings, objects, integers or categories instead of datetimes (GH 57512)

  • Bug in read_csv() with engine="c" and comment not skipping a line containing only whitespace before the comment character (GH 55916)

  • Bug in read_csv() with engine="c" and skiprows treating a quote in a skipped leading line as opening a field, skipping the wrong lines or raising EmptyDataError (GH 34732)

  • Bug in read_csv() with engine="c" occasionally dropping leading whitespace from the first value of a line in large inputs (GH 34085)

  • Bug in read_csv() with engine="c" shifting a row’s values one column left when the row starts with the delimiter and follows a blank, comment, or skipped line in a file with \r line endings (GH 71409)

  • Bug in read_csv() with engine="pyarrow" and parse_dates converting a non-date index_col (e.g. integers) to strings (GH 71873)

  • Bug in read_csv() with engine="pyarrow" raising EmptyDataError for input whose only line lacks a trailing newline (GH 62635)

  • Bug in read_csv() with engine="pyarrow" silently wrapping values outside the range of the requested integer dtype instead of raising (GH 38013)

  • Bug in read_csv() with engine="python" and index_col reading a date like "20180101" as nanoseconds since the epoch when dtype is a pyarrow timestamp dtype (GH 24542)

  • Bug in read_csv(), read_excel(), read_fwf() and read_html() returning wrong column labels and treating header rows as data when header was a list not in increasing order, such as header=[1, 0] (GH 47011)

  • Bug in read_csv(), read_html() and other I/O functions raising UnicodeEncodeError for URLs containing non-ASCII characters (GH 21499)

  • Bug in read_csv(), DataFrame.to_csv() and other I/O functions raising URLError for sftp:// URLs instead of reading or writing them with fsspec (GH 46765)

  • Bug in read_excel() raising ValueError when header is a list and index_col consumes all columns (GH 66372)

  • Bug in read_html() raising ImportError when lxml is not installed instead of falling back to bs4 + html5lib with the default flavor=None (GH 30281)

  • Bug in read_html() with the bs4 or html5lib parser dropping tables that have identical content, so only the first was returned (GH 49934)

  • Bug in read_json() raising ValueError on numbers whose integer part does not fit in int64 or uint64 (e.g. 100000000000000000000.5), and silently returning a wrong value for some of them (GH 20599)

  • Bug in read_orc() raising whenever filesystem was passed (GH 58746)

  • Bug in read_sas() exhausting memory instead of raising ValueError on a SAS7BDAT file that claims more rows than it can hold, when read from an uncompressed file, a zip archive, or a BytesIO (GH 70721)

  • Bug in read_sas() returning rows that were deleted from an uncompressed SAS7BDAT file (GH 15963)

  • Bug in read_sas() with format="xport" reading zeros as 5.397605e-79 (GH 50670)

  • Bug in read_xml() with names and an iterparse list repeating a name, where values were shifted into the wrong column or dropped in large files or when repeated values were equal or empty (GH 71275)

  • Bug in DataFrame.to_csv() with MultiIndex columns and an unnamed index or index_label=False where a first row of missing values was read back by read_csv() as the index names and dropped; an empty index-names line is now written in this case (GH 21995)

  • Bug in DataFrame.to_csv(), DataFrame.to_json(), DataFrame.to_pickle() and similar writers where writing to a file:// URL raised for a new file and silently left an existing file unchanged; writing to other URLs such as http:// now raises instead of silently discarding the data (GH 55828)

  • Bug in DataFrame.to_excel() where a NaN label in MultiIndex columns was written as the last value of that level instead of an empty cell (GH 62340)

  • Bug in DataFrame.to_json() and Series.to_json() dropping the nanoseconds of tz-aware datetime columns and Timestamp objects, and with date_format="epoch" mis-rounding pre-1970 datetime objects or raising OverflowError for ones outside the nanosecond bounds at a coarser date_unit (GH 53473)

  • Bug in DataFrame.to_parquet() with engine="pyarrow" where a misspelled keyword argument truncated an existing file at the destination or was reported as an error about the path (GH 45815)

  • Bug in DataFrame.to_sql() creating MySQL and MariaDB datetime and time columns that silently dropped fractional seconds (GH 48435)

  • Bug in DataFrame.to_sql() with if_exists="append" or if_exists="delete_rows" writing to an existing table hanging on SQL Server while another session had uncommitted changes to an unrelated table (GH 52601)

  • Bug in DataFrame.to_sql() with if_exists="delete_rows" raising InvalidRequestError for an existing temporary table (GH 52601)

  • Bug in DataFrame.to_stata() raising ValueError for an empty DataFrame with a categorical column, and read_stata() not converting the column back to a categorical (GH 71126)

  • Bug in DataFrame.to_string(), Series.to_string() and DataFrame.to_html() ignoring na_rep for None, pd.NA, and NaT values in object-dtype columns and an explicit na_rep="NaN" for any missing value, and in DataFrame.to_xml() raising for na_rep with nullable, pyarrow-backed, or categorical columns containing missing values (GH 54872)

  • Bug in DataFrame.to_string(), Series.to_string() and their repr where values or labels containing ANSI color codes were counted toward the column width, misaligning the other rows (GH 55122)

  • Bug in displaying a Series or DataFrame in IPython with display.html.table_schema enabled printing a traceback when the data cannot be converted to JSON, such as non-UTF-8 bytes (GH 16848)

  • Bug in the display of a MultiIndex (repr, DataFrame.to_string(), DataFrame.to_html(), Styler) where distinct labels that display identically (e.g. 1 and "1") were shown as a single label; DataFrame.to_excel() merged them into one cell, losing all but the first value (GH 10796)

  • Bug in the repr of a Series or DataFrame where values displayed as 0 by the display.chop_threshold option still caused the column to be shown in scientific notation (GH 12374)

  • Bug in the repr of a Series or DataFrame with longdouble (e.g. float128) dtype showing values outside the float64 range as 0 or inf (GH 17809)

  • Fixed bug in read_csv() where callable skiprows received incorrect row numbers on 32-bit big-endian architectures (GH 69985)

  • Bug in ExcelWriter with engine="openpyxl" ignoring date_format and datetime_format (GH 44284, GH 59882)

  • read_json() with orient="table" now reads back non-string column labels and index names, such as the default integer columns of DataFrame([[1, 2]]), instead of returning all-NaN values or raising IntCastingNaNError; labels it cannot match to the data, such as 5 alongside "5", now raise ValueError (GH 19129)

  • DataFrame.to_json() and Series.to_json() with orient="table", and build_table_schema(), no longer raise AttributeError for a MultiIndex with non-string level names (GH 19129)

  • Bug in read_csv() where using engine="python" with custom converters returning unhashable types (such as lists or dicts) raised TypeError (GH 56848)

  • Bug in read_excel() with dtype_backend="numpy_nullable" converting mixed-type columns and datetime.time columns to string dtype; such columns now preserve object dtype and the original Python types (GH 63830)

  • Bug in read_excel() with dtype_backend="pyarrow" raising pyarrow.ArrowInvalid for columns with mixed types (e.g. integers and strings); such columns now fall back to object dtype, matching the default behaviour without dtype_backend="pyarrow" (GH 63830)

  • Bug in read_json() with orient="table" raising for a tz-naive datetime field whose values carry a UTC offset, such as files written by pandas before 1.5; the values are now converted to UTC (GH 52595)

  • Bug in read_json() with typ="series" returning datetime64 dtype for all-null data instead of float64, matching DataFrame columns (GH 35464)

  • Bug in read_sas() raising IndexError or reading the wrong format or label for SAS7BDAT files with columns renamed or relabeled after the file was written (GH 60809)

  • Bug in read_sql_query() and read_sql_table() with a SQLAlchemy connection returning column labels that require sqlalchemy to unpickle (GH 52816)

  • Bug in read_sql() and read_sql_query() raising or altering a query containing an unescaped % and no params when using a SQLAlchemy connection to a database driver such as pymysql or psycopg2 (GH 49561)

  • Bug in DataFrame.to_json() and Series.to_json() with orient="table" declaring complex data as a "number" field that read_json() then failed to read with TypeError; it now round-trips (GH 50782)

  • Bug in DataFrame.to_json() and Series.to_json() writing floats near the largest float64 value in a form that reads back as inf (GH 21454)

  • Bug in HDFStore.append() raising ValueError: Buffer dtype mismatch instead of the “different categories” error when appending a categorical whose categories have a different dtype than the existing ones (GH 71128)

  • Bug in HDFStore.remove() deleting unselected rows when passing unsorted row coordinates (GH 71276)

  • Bug in HDFStore.select() and HDFStore.select_as_multiple() returning the wrong rows when combining where with start or stop and chunksize or iterator (GH 71278)

  • Bug in Series.to_json() with orient="table" writing a falsy Series name such as 0, False or "" as "values" (GH 19129)

  • Bug where the pickled bytes (e.g. for joblib.hash) of a Series, DataFrame or Index with datetimelike or extension-dtype data depended on which operations had previously been run on it (GH 49170)

  • Fixed a segfault in DataFrame.to_json() and Series.to_json() with date_format="iso" when datetime conversion raises an exception (GH 69461)

Period#

Plotting#

Groupby/resample/rolling#

Reshaping#

Sparse#

ExtensionArray#

  • Bug in read_csv() and other parsing of strings into a decimal ArrowDtype raising ArrowInvalid instead of parsing the values (GH 69838)

  • Bug in ArrowExtensionArray.factorize() ignoring use_na_sentinel=True for dictionary-encoded PyArrow data that stores nulls as dictionary values, keeping the null in the returned uniques or raising ArrowInvalid for chunked data (GH 66490)

  • Bug in DataFrame.apply() and DataFrame.aggregate() where a single callable reducing each column (or row) of a nullable- or PyArrow-backed frame to a scalar gave a NumPy-dtyped result, e.g. float64 rather than double[pyarrow] (GH 61812)

  • Bug in Series.dt.strftime() on PyArrow-backed timestamp and date data where %S included fractional seconds and %f and %N were not supported (GH 55001)

  • Bug in Series.isin(), DataFrame.isin(), and Index.isin() on PyArrow-backed dtypes raising when values held a mix of types PyArrow cannot combine (GH 70300)

  • Bug in Series.mode() and DataFrame.mode() with dropna=False raising TypeError for "boolean" dtype (GH 70487)

  • Bug in Series.rank() raising ArrowNotImplementedError for an ArrowDtype that PyArrow cannot rank, such as list[pyarrow]; the values are now ranked as Python objects, so lists rank lexicographically (GH 69136)

  • Bug in the DataFrame constructor with a dtype such as "Float64" not copying its input when it should, so that writes to one changed the other and operations like DataFrame.unstack() could be very slow (GH 52338)

  • Bug in Series.replace(), Series.where(), Series.fillna(), item assignment and related methods on a PyArrow-backed integer dtype silently truncating a fractional value, including one passed in a list (replace(2, 1.5) stored 1); these now raise TypeError, while Index.where(), Index.putmask() and Index.fillna() upcast, matching the nullable integer dtypes (GH 68638, GH 71076)

  • Bug in Series.skew() and Series.kurt() (and their DataFrame counterparts) on PyArrow-backed numeric data returning an arbitrary value for constant data, losing precision on data with a large offset, and raising TypeError with pyarrow < 20; undefined results are now NA instead of NaN, matching the nullable float dtypes (GH 71829)

  • Bug in Series.value_counts() with dropna=False on nullable dtypes placing missing values last (or last among equal counts) instead of in order of first appearance (GH 23074)

  • Bug in arithmetic and logical operations on PyArrow-backed data raising pyarrow.ArrowInvalid or pyarrow.ArrowTypeError instead of TypeError when the other operand contains objects PyArrow cannot convert (GH 62682)

  • Bug in comparisons between PyArrow-backed data and objects PyArrow cannot convert raising pyarrow.ArrowInvalid or pyarrow.ArrowTypeError; ==/!= now compare elementwise, ordered comparisons raise TypeError, and a missing value on either side propagates instead of answering False (GH 62682)

  • Bug in constructing or setting values into a numeric, boolean or temporal ArrowDtype from a NumPy string array sometimes crashing the interpreter or returning incorrect values (GH 71827)

Styler#

Other#

  • Bug in api.interchange.from_dataframe() with allow_copy=False always raising RuntimeError for objects supporting the Arrow PyCapsule Interface, even when a zero-copy conversion is possible (GH 71189)

  • Bug in eval() with a multi-line expression and a target raising UndefinedVariableError when a line after the first referenced a variable (GH 31952)

  • Bug in eval(), DataFrame.eval() and DataFrame.query() where not performed a bitwise inversion instead of a logical negation, e.g. pd.eval("not True") returned -2 and df.query("a > 1 and not True") could return rows (GH 11367)

  • Bug in testing.assert_series_equal() and testing.assert_frame_equal() with check_dtype=False and check_exact=True comparing missing values against an object column differently from check_exact=False; pd.NA and NaT no longer match np.nan or None (GH 61473)

  • Bug in testing.assert_series_equal(), testing.assert_frame_equal() and testing.assert_index_equal() treating np.nan and None as equal when they appear inside NumPy arrays stored in object-dtype values (GH 55492)

  • Bug in util.hash_array() and util.hash_pandas_object() raising UnicodeDecodeError on mixed-type object values containing non-ASCII bytes; bytes in mixed-type values now hash the same as in non-mixed ones (GH 27215)

  • Bug in DataFrame.agg() with a list of functions raising ArrowInvalid on pyarrow-backed columns with large integer results (GH 71875)

  • Bug in DataFrame.agg(), Series.agg() and the agg methods of groupby, resample and window objects silently ignoring *args and **kwargs when func is a dict, e.g. df.agg({"a": "sum"}, min_count=1); they are now passed to each function, as with a list of functions, so a function that does not accept them now raises TypeError (GH 23889)

  • Bug in DataFrame.apply() with raw=True casting scalar results to the dtype of the first one, e.g. 1 followed by 2.5 gave 2; the dtype is now inferred from all results, as with raw=False (GH 61632)

  • Bug in DataFrame.duplicated() and DataFrame.drop_duplicates() raising ValueError when subset is an empty list; no rows are now marked as duplicates, matching a DataFrame with no columns (GH 12869)

  • Bug in DataFrame.eval() and DataFrame.query() with engine="numexpr" where a column used again in a later line of a multi-line expression, or after a subscript such as a[a > 0], was treated as a NumPy array, raising TypeError or silently giving wrong results; eval() also no longer replaces the values of a passed resolvers mapping with NumPy arrays (GH 59062)

  • Bug in DataFrame.eval(), DataFrame.query(), and eval() with the default engine="numexpr" raising RecursionError for arithmetic between object or string columns (e.g. "a + b" on two string columns) and ValueError for an expression that is a single object or string column or string literal, such as "c = 'foo'" (GH 15320, GH 21088, GH 27639)

  • Bug in DataFrame.eval(), DataFrame.query(), and eval() raising TypeError when adding a string to an object or string column, e.g. df.eval("a + 'x'") (GH 47734)

  • Bug in DataFrame.eval(), DataFrame.query(), and eval() with the default engine="numexpr" raising ValueError for a unary operator such as not on an object or string column (GH 45876)

  • Bug in DataFrame.from_dict() with orient="index" silently setting a row’s values to NaN when its tuple key contained None or NaN (GH 28390)

  • Bug in DataFrame.query() and DataFrame.eval() raising ValueError or UndefinedVariableError when the expression calls Timestamp, datetime, list or tuple, e.g. df.query("a > Timestamp('2020-01-01')") (GH 50442)

  • Bug in DataFrame.query() and DataFrame.eval() where == and != against a string gave different results than the same comparison outside of query, e.g. returning no rows for a datetime64, timedelta64, or PeriodDtype column, or raising NotImplementedError with parser="python" (GH 54199)

  • Bug in DataFrame.query() and DataFrame.eval() where a column named inf or Inf was ignored in favor of np.inf, raising KeyError or silently returning wrong results (GH 47859)

  • Bug in DataFrame.query() and DataFrame.eval() with engine="numexpr" raising AttributeError for some comparisons and in/not in checks whose operand is a math function or unary operator, e.g. abs(a) in [1, 2] (GH 31848)

  • Bug in Index.get_loc(), Series.value_counts(), Series.duplicated(), Series.isin() and other object-dtype operations where a SystemExit raised by a custom __hash__ or __eq__ was silently suppressed (GH 57052)

  • Bug in calling a generalized ufunc on a Series raising AttributeError when it reduced object data to a single object pandas does not recognize as a scalar, e.g. shapely.geometrycollections returning a geometry (GH 71109)

  • Bug in eval(), DataFrame.eval(), and DataFrame.query() raising on some datetime64 and timedelta64 operations, e.g. df.query("time > @now - @delta"), and returning float32 for a float32 column times a np.timedelta64 (GH 30729, GH 52559)

  • Bug in DataFrame.eval() and eval() where assigning to a backtick-quoted name that is not a valid Python identifier, e.g. df.eval("`a-b` = a + b"), created a column labeled BACKTICK_QUOTED_STRING_a_MINUS_b instead of "a-b" (GH 47699)

  • Bug in DataFrame.replace() and Series.replace() with inplace=True and a list-like or dict to_replace using memory proportional to the number of values to replace times the length of the data, raising MemoryError for large mappings (GH 25816)

  • Bug where configuration options and pandas’ C extension modules could be left uninitialized when running under Python’s global lazy imports mode (-X lazy_imports=all) (GH 71173)

Contributors#

A total of 101 people contributed patches to this release. People with a “+” by their names contributed a patch for the first time.

  • ASWANTH R +

  • Aahan G +

  • Aarya +

  • Aarya Prakash +

  • Aarya2004 +

  • Abhishek Kumar +

  • Abhishek kr. Chauhan +

  • Abhishek1106kr +

  • Aidan Feldman

  • Ammar Hassona +

  • Anirudh +

  • Aniruktha +

  • Anushka Dudhe +

  • Atik +

  • Ayush Kumar +

  • Ayush Srivastava +

  • Breno Barreto +

  • Brock

  • Chaimaa Abi +

  • Chetan Sahney +

  • Davin Khotob +

  • Deon Binny +

  • DeviousCardi +

  • Dr-Irv

  • Enrico Lockner +

  • Eugenio “Jay” Zuccarelli +

  • Fangchen Li

  • Filipe Rangel +

  • Furqan Khan +

  • GON +

  • Ge Li +

  • Gore Williams +

  • H23 +

  • Iason Krommydas +

  • Igor Souza Lima +

  • Ishaan

  • Ishan Kumar +

  • Itssubhraneelbruv +

  • Johnny Kao +

  • Johnny Wilson Dougherty +

  • Joris Van den Bossche

  • Juan Miguel Contreras +

  • Julian Harbeck

  • Junpei Zhang +

  • Koussay-mehdouani +

  • Krishn +

  • Laraib Butt +

  • Leo Camus +

  • Likhitha J +

  • Maha Rana Yadavalli +

  • Maha Yadavalli +

  • Mannava Daasaradhi +

  • Manvi Soni +

  • Matthew Roeschke

  • Minh Tuan Pham +

  • Mohd Maaz Khan +

  • Monika Dvorackova +

  • N3verm1nd

  • Natalia Mokeeva

  • Noah

  • Odysseas Yiakoumis +

  • Pablo Galindo Salgado +

  • Parman Mohammadalizadeh +

  • Pieter Eendebak +

  • Pranav Choudhary

  • Riaz1729 +

  • Richard Shadrach

  • Ryan George +

  • S.A +

  • Saihritesh

  • SamuelOndrus +

  • Seungtaek Oh +

  • Sharathkumara +

  • Shriraj Jadhav +

  • Shuheng (Markus) Ma +

  • Sugandh Garg +

  • TensorDevLJ +

  • Tharoboiz +

  • Tiereonna +

  • Trinh Quoc Anh

  • Trupti603 +

  • Vincent Ngo +

  • Vividh Yadav +

  • Weijian He +

  • Wrethis +

  • britz +

  • furqankhan +

  • guptaishaan

  • jbrockmendel

  • layeh +

  • maharanay22 +

  • matiaslindgren

  • pei711 +

  • ramchaser

  • root

  • sundeep8967 +

  • tanveer-arch +

  • ump45nose

  • yuchen-xu +

  • Álvaro Kothe

  • “galleonli” +