selection_rank
int64
0
10k
uid
stringlengths
17
29
source
stringclasses
7 values
split
stringclasses
3 values
row_idx
int64
0
58.9k
instance_id
stringlengths
14
120
repo
stringclasses
246 values
repo_canon
stringclasses
232 values
language
stringclasses
8 values
base_commit
stringlengths
40
40
⌀
problem_statement
stringlengths
84
23.6k
extra_context
stringclasses
626 values
hints
stringlengths
0
59.3k
patch
stringlengths
252
175k
test_patch
stringlengths
0
358k
f2p
stringlengths
10
155k
⌀
p2p
stringlengths
2
1.75M
⌀
env_image
stringlengths
41
154
⌀
env_available
bool
1 class
created_at
stringlengths
10
20
⌀
n_src_files
int64
1
15
src_lines
int64
1
1.48k
n_f2p
float64
1
1.87k
⌀
ps_chars
int64
84
23.6k
leak_ratio
float64
0
0.6
s_prior
float64
0.6
1
s_verif
float64
0.75
1
s_ps
float64
0.04
1
s_patch
float64
0.07
1
s_tiebreak
float64
0.02
1
score
float64
47.9
98.6
200
swe_gym::train::496
swe_gym
train
496
python__mypy-10389
python/mypy
python/mypy
python
d37c2be0f7a2002a0a8c160622d937518f902cc7
Treat bool as equivalent to Literal[True, False] to allow better type inference Similar to this https://github.com/python/mypy/issues/6027, but more basic use case. ```python from typing import Collection, Union, List def foo(bar: Union[bool, Collection[int]]) -> Union[int, List[int]]: if bar is False: # or if...
I think this can be done using literal types: essentially we can treat `bool` as `Union[Literal[True], Literal[False]]`. cc @Michael0x2a This appeared again so raising priority to normal. Would like to take a stab at this if no one's picked it up already!
diff --git a/mypy/checker.py b/mypy/checker.py --- a/mypy/checker.py +++ b/mypy/checker.py @@ -51,7 +51,7 @@ map_type_from_supertype, bind_self, erase_to_bound, make_simplified_union, erase_def_to_union_or_bound, erase_to_union_or_bound, coerce_to_literal, try_getting_str_literals_from_type, try_getting_...
diff --git a/test-data/unit/check-dynamic-typing.test b/test-data/unit/check-dynamic-typing.test --- a/test-data/unit/check-dynamic-typing.test +++ b/test-data/unit/check-dynamic-typing.test @@ -159,9 +159,9 @@ a or d if int(): c = a in d # E: Incompatible types in assignment (expression has type "bool", variabl...
["mypy/test/testcheck.py::TypeCheckSuite::testNarrowingBooleanIdentityCheck", "mypy/test/testcheck.py::TypeCheckSuite::testNarrowingBooleanBoolOp", "mypy/test/testcheck.py::TypeCheckSuite::testNarrowingBooleanTruthiness"]
["mypy/test/testcheck.py::TypeCheckSuite::testNewAnalyzerRedefinitionAndDeferral1b", "mypy/test/testcheck.py::TypeCheckSuite::testNarrowingTypedDictUsingEnumLiteral"]
null
true
2021-04-30T12:56:18Z
3
94
3
1,931
0
0.85
1
0.85
1
0.635167
91.7805
201
swe_gym::train::1420
swe_gym
train
1,420
pandas-dev__pandas-52201
pandas-dev/pandas
pandas-dev/pandas
python
9eee1073c2d0602569ca445b7509dedf906f4af5
ENH: DatetimeTZDtype is missing `__from_arrow__` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the [m...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index c3355757350b9..1e1c9517d5ef7 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -85,6 +85,7 @@ Other enhancements - Add dtype of categories to ``repr`` information of :class:`CategoricalDtype` (:issue:`5...
diff --git a/pandas/tests/arrays/datetimes/test_constructors.py b/pandas/tests/arrays/datetimes/test_constructors.py index bbc66dcd328c3..30f47e37fedf5 100644 --- a/pandas/tests/arrays/datetimes/test_constructors.py +++ b/pandas/tests/arrays/datetimes/test_constructors.py @@ -1,6 +1,8 @@ import numpy as np import pyt...
["pandas/tests/arrays/datetimes/test_constructors.py::test_from_arrowtest_from_arrow_with_different_units_and_timezones_with_[us-ms-UTC-Europe/Berlin-data5]", "pandas/tests/arrays/datetimes/test_constructors.py::test_from_arrow_from_empty[ms-Europe/Berlin]", "pandas/tests/arrays/datetimes/test_constructors.py::test_fro...
["pandas/tests/arrays/datetimes/test_constructors.py::TestDatetimeArrayConstructor::test_from_sequence_invalid_type", "pandas/tests/arrays/datetimes/test_constructors.py::TestDatetimeArrayConstructor::test_non_array_raises", "pandas/tests/arrays/datetimes/test_constructors.py::TestSequenceToDT64NS::test_2d[F]", "pandas...
null
true
2023-03-25T14:58:42Z
3
39
14
3,628
0
0.85
1
0.92
1
0.63
91.76
202
swe_gym::train::1459
swe_gym
train
1,459
pandas-dev__pandas-50992
pandas-dev/pandas
pandas-dev/pandas
python
f3015e39439920d3d00a328714c06b6805f7f32b
BUG: to_datetime with out-of-bounds np.datetime64 and errors='ignore' doesn't return input ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] ...
> The docs say that with errors='ignore', the input will be returned, but that's not happening here ive been thinking about this recently w/r/t to the two helpers in tslib.pyx. I figure "ignore" means either a) "return the input unchanged", in which case we should consider deprecating it and telling users to do ...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index c814e585672cb..434b76b42d938 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1025,6 +1025,7 @@ Datetimelike - Bug in :func:`to_datetime` was raising ``ValueError`` when parsing mixed-offset :class:`T...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index a1217b268613a..7a93d2fe8b5ce 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -1084,9 +1084,15 @@ def test_to_datetime_array_of_dt64s(self, cache, unit): # numpy...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_array_of_dt64s[True-s]", "pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_array_of_dt64s[True-D]", "pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_array_of_dt64s[False-D]", "pandas/tests/tools/t...
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2023-01-26T11:14:36Z
2
61
4
2,547
0
0.85
1
0.85
1
0.627833
91.7585
203
swe_gym::train::1694
swe_gym
train
1,694
pandas-dev__pandas-50364
pandas-dev/pandas
pandas-dev/pandas
python
52c653b437db67815203872de6179b1f7adeb148
BUG: str dtype ignored for column with '.' if thousands='.' for python engine ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confir...
Thanks for the report, can confirm this reproduces
diff --git a/pandas/io/parsers/python_parser.py b/pandas/io/parsers/python_parser.py index 315d18d052d9f..4b887a904400d 100644 --- a/pandas/io/parsers/python_parser.py +++ b/pandas/io/parsers/python_parser.py @@ -29,7 +29,11 @@ ParserError, ) -from pandas.core.dtypes.common import is_integer +from pandas.core.d...
diff --git a/pandas/tests/io/parser/test_python_parser_only.py b/pandas/tests/io/parser/test_python_parser_only.py index ca5a757328ba7..b22953fedd6af 100644 --- a/pandas/tests/io/parser/test_python_parser_only.py +++ b/pandas/tests/io/parser/test_python_parser_only.py @@ -14,6 +14,7 @@ ) from typing import Iterator ...
["pandas/tests/io/parser/test_python_parser_only.py::test_no_thousand_convert_with_dot_for_non_numeric_cols[python-dtype1]", "pandas/tests/io/parser/test_python_parser_only.py::test_no_thousand_convert_for_non_numeric_cols[python-dtype0-expected0]", "pandas/tests/io/parser/test_python_parser_only.py::test_no_thousand_c...
["pandas/tests/io/parser/test_python_parser_only.py::test_on_bad_lines_callable_returns_none[python]", "pandas/tests/io/parser/test_python_parser_only.py::test_on_bad_lines_callable_iterator_true[python-,-<lambda>0]", "pandas/tests/io/parser/test_python_parser_only.py::test_encoding_non_utf8_multichar_sep[python-utf-16...
null
true
2022-12-20T17:18:00Z
1
40
4
2,939
0
0.85
1
0.85
1
0.623167
91.7445
204
swe_gym::train::432
swe_gym
train
432
python__mypy-15155
python/mypy
python/mypy
python
6b1fc865902bf2b845d3c58b6b9973b5a412241f
Crash type-checking overloaded function **Crash Report** Crash typing code that previously on older mypy versions worked fine. Not sure exactly how old the last working mypy version is for this, though (I think the release that broke this would have had to have been some time around January 2023). **Traceback** ```...
Thanks for the report! I think this bisects to https://github.com/python/mypy/pull/14178
diff --git a/mypy/applytype.py b/mypy/applytype.py --- a/mypy/applytype.py +++ b/mypy/applytype.py @@ -75,7 +75,6 @@ def apply_generic_arguments( report_incompatible_typevar_value: Callable[[CallableType, Type, str, Context], None], context: Context, skip_unsatisfied: bool = False, - allow_erased_call...
diff --git a/test-data/unit/check-generics.test b/test-data/unit/check-generics.test --- a/test-data/unit/check-generics.test +++ b/test-data/unit/check-generics.test @@ -2698,3 +2698,16 @@ def func(var: T) -> T: reveal_type(func(1)) # N: Revealed type is "builtins.int" [builtins fixtures/tuple.pyi] + +[case testG...
["mypy/test/testcheck.py::TypeCheckSuite::check-generics.test::testGenericLambdaGenericMethodNoCrash"]
[]
null
true
2023-04-28T23:16:19Z
3
51
1
2,714
0
0.85
1
0.85
1
0.622333
91.742
205
swe_gym::train::937
swe_gym
train
937
dask__dask-8865
dask/dask
dask/dask
python
5fbda77cfc5bc1b8f1453a2dbb034b048fc10726
Confusing error from map_blocks if function returns scalar per block **What happened**: `map_blocks` raises a confusing error when the mapped function returns a scalar. **What you expected to happen**: Let the user know that the function should return a single element array. **Minimal Complete Verifiable Example**...
Thanks for writing this up @dcherian! I hadn't realized that we fail for this case on the array side. On the dataframe side we seem to handle this more gracefully, so we can probably mimic that on the array side. ```python import dask.dataframe as dd ddf = dd.from_array(array) ddf.map_partitions(np.mean).comput...
diff --git a/dask/array/core.py b/dask/array/core.py --- a/dask/array/core.py +++ b/dask/array/core.py @@ -478,7 +478,7 @@ def apply_infer_dtype(func, args, kwargs, funcname, suggest_dtype="dtype", nout= msg = None if msg is not None: raise ValueError(msg) - return o.dtype if nout is None else...
diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py --- a/dask/array/tests/test_array_core.py +++ b/dask/array/tests/test_array_core.py @@ -5236,3 +5236,61 @@ def test_len_object_with_unknown_size(): b = a[a < 0.5] with pytest.raises(ValueError, match="on object with unknown...
["dask/array/tests/test_array_core.py::test_chunk_non_array_like", "dask/array/tests/test_array_core.py::test_chunk_shape_broadcast[8]", "dask/array/tests/test_array_core.py::test_chunk_shape_broadcast[1]", "dask/array/tests/test_array_core.py::test_chunk_shape_broadcast[3]", "dask/array/tests/test_array_core.py::test_...
["dask/array/tests/test_array_core.py::test_normalize_chunks_nan", "dask/array/tests/test_array_core.py::test_stack_scalars", "dask/array/tests/test_array_core.py::test_astype", "dask/array/tests/test_array_core.py::test_meta[dtype1]", "dask/array/tests/test_array_core.py::test_vindex_basic", "dask/array/tests/test_arr...
null
true
2022-03-31T11:24:22Z
2
92
5
1,824
0
0.85
1
0.85
1
0.610667
91.707
206
swe_bench_pro::test::463
swe_bench_pro
test
463
instance_navidrome__navidrome-1e96b858a91c640fe64e84c5e5ad8cc0954ea38d
navidrome/navidrome
navidrome/navidrome
go
aafd5a952c2cf19868b681c52400b395c33273a0
# Add support for Reverse Proxy authentication in the Subsonic endpoint parameter validation ### Version: 0.49.3 / 2cd4358 ### Current Behavior: Navidrome can be configured to delegate authentication to a reverse proxy using the ReverseProxyWhitelist and ReverseProxyUserHeader settings, but the Subsonic endpoint (/...
## Requirements - The Subsonic API's parameter-validation middleware (checkRequiredParameters) must not require the u (username) parameter when reverse-proxy authentication is applicable. Reverse-proxy authentication is applicable when the request originates from an IP within the configured ReverseProxyWhitelist and a ...
diff --git a/server/subsonic/middlewares.go b/server/subsonic/middlewares.go index 1efaf6157b6..50d878b25df 100644 --- a/server/subsonic/middlewares.go +++ b/server/subsonic/middlewares.go @@ -1,7 +1,6 @@ package subsonic import ( - "context" "crypto/md5" "encoding/hex" "errors" @@ -19,6 +18,7 @@ import ( "...
diff --git a/server/subsonic/middlewares_test.go b/server/subsonic/middlewares_test.go index 5ef7d1b07bb..ea5f75186f9 100644 --- a/server/subsonic/middlewares_test.go +++ b/server/subsonic/middlewares_test.go @@ -76,7 +76,7 @@ var _ = Describe("Middlewares", func() { }) Describe("CheckParams", func() { - It("pas...
["TestSubsonicApi"]
[]
ghcr.io/scaleapi/swe-bench_pro-v2:instance_navidrome__navidrome-1e96b858a91c640fe64e84c5e5ad8cc0954ea38d
true
null
1
83
1
2,181
0
0.95
1
0.85
1
0.640167
91.6955
207
swe_gym::train::1506
swe_gym
train
1,506
pandas-dev__pandas-50627
pandas-dev/pandas
pandas-dev/pandas
python
71db310a328a0dfa194ef0fe2b95238817b4f419
API: GroupBy.agg() numeric_only deprecation with custom function Case: using `groupby().agg()` with a custom numpy funtion object (`np.mean`) instead of a built-in function string name (`"mean"`). When using pandas 1.5, we get a future warning about numeric_only going to change (https://github.com/pandas-dev/pandas/is...
If I turn the numpy function into an actual UDF by using a small wrapper: ``` def myfunc(group): return np.mean(group) ``` then we actually already do get a different (and clearer) deprecation warning: ``` >>> df.groupby("key").agg(myfunc) FutureWarning: ['col1'] did not aggregate successfully. If any...
diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index 9d17d3cf7bea9..2ff1ed541aed4 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -19,6 +19,7 @@ Fixed regressions - Enforced reversion of ``color`` as an alias for ``c`` and ``size`` as an alias for ``s``...
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index 3bcb7d964fad1..faa89e556a01e 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -1287,6 +1287,27 @@ def test_nuiscance_columns(): tm.assert_frame_equal(result, expecte...
["pandas/tests/reshape/test_pivot.py::TestPivotTable::test_margin_with_only_columns_defined[A-mean-values0-expected_columns0]", "pandas/tests/groupby/test_apply.py::test_numeric_only_warning_numpy", "pandas/tests/groupby/test_groupby.py::test_wrap_aggregated_output_multindex", "pandas/tests/reshape/test_pivot.py::TestP...
["pandas/tests/groupby/aggregate/test_aggregate.py::test_callable_result_dtype_frame[apply-int32-int64-keys1-agg_index1]", "pandas/tests/groupby/transform/test_transform.py::test_null_group_str_reducer_series[True-max]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[mad-apply-Int64-keys0-columns1]", "pandas...
null
true
2023-01-07T21:02:58Z
3
63
11
2,378
0
0.85
1
0.85
1
0.606333
91.694
208
swe_bench_verified::test::304
swe_bench_verified
test
304
pydata__xarray-4075
pydata/xarray
pydata/xarray
python
19b088636eb7d3f65ab7a1046ac672e0689371d8
[bug] when passing boolean weights to weighted mean #### MCVE Code Sample ```python import numpy as np import xarray as xr dta = xr.DataArray([1., 1., 1.]) wgt = xr.DataArray(np.array([1, 1, 0], dtype=np.bool)) dta.weighted(wgt).mean() ``` Returns ``` <xarray.DataArray ()> array(2.) ``` #### Expected Output ``` <...
diff --git a/xarray/core/weighted.py b/xarray/core/weighted.py --- a/xarray/core/weighted.py +++ b/xarray/core/weighted.py @@ -142,7 +142,14 @@ def _sum_of_weights( # we need to mask data values that are nan; else the weights are wrong mask = da.notnull() - sum_of_weights = self._reduce(mask,...
diff --git a/xarray/tests/test_weighted.py b/xarray/tests/test_weighted.py --- a/xarray/tests/test_weighted.py +++ b/xarray/tests/test_weighted.py @@ -59,6 +59,18 @@ def test_weighted_sum_of_weights_nan(weights, expected): assert_equal(expected, result) +def test_weighted_sum_of_weights_bool(): + # https://...
["xarray/tests/test_weighted.py::test_weighted_sum_of_weights_bool", "xarray/tests/test_weighted.py::test_weighted_mean_bool"]
["xarray/tests/test_weighted.py::test_weighted_non_DataArray_weights[True]", "xarray/tests/test_weighted.py::test_weighted_non_DataArray_weights[False]", "xarray/tests/test_weighted.py::test_weighted_weights_nan_raises[weights0-True]", "xarray/tests/test_weighted.py::test_weighted_weights_nan_raises[weights0-False]", "...
null
true
2020-05-18T18:42:05Z
1
9
2
1,720
0
1
1
0.85
1
0.316667
91.675
209
swe_gym::train::866
swe_gym
train
866
iterative__dvc-6706
iterative/dvc
iterative/dvc
python
612696cf4ae01885a89269b5d26b4631380614b8
exp run: unexpected error - cannot represent an object: {'lr': 0.1} # Bug Report ## Description I have updated DVC version from 2.5.4 to latest version 2.6.4. I am running my experiments with `dvc exp run`. I use -S option to use different parameters between experiments. Following the [get-started example](https://g...
It seems that the breaking change was introduced in https://github.com/iterative/dvc/pull/6378 as part of the [2.6.0 release](https://github.com/iterative/dvc/releases/tag/2.6.0). I will take a look and try to come back with more details. Pd. There is an [open issue](https://github.com/iterative/dvc/issues/5477) abo...
diff --git a/dvc/utils/_benedict.py b/dvc/utils/_benedict.py new file mode 100644 --- /dev/null +++ b/dvc/utils/_benedict.py @@ -0,0 +1,26 @@ +""" +Rollbacks monkeypatching of `json.encoder` by benedict. + +It monkeypatches json to use Python-based encoder instead of C-based +during import. + +We rollback that monkeypa...
diff --git a/tests/unit/utils/test_collections.py b/tests/unit/utils/test_collections.py --- a/tests/unit/utils/test_collections.py +++ b/tests/unit/utils/test_collections.py @@ -1,4 +1,7 @@ # pylint: disable=unidiomatic-typecheck +import json +from json import encoder + import pytest from mock import create_autospe...
["tests/unit/utils/test_collections.py::test_merge_params_on_empty_src[changes0-expected0]", "tests/unit/utils/test_collections.py::test_merge_params[changes5-expected5]", "tests/unit/utils/test_collections.py::test_merge_params[changes7-expected7]", "tests/unit/utils/test_collections.py::test_merge_params[changes0-exp...
["tests/unit/utils/test_collections.py::test_pre_validate_decorator_required_args", "tests/unit/utils/test_collections.py::test_post_validate_decorator", "tests/unit/utils/test_collections.py::test_apply_diff_mapping", "tests/unit/utils/test_collections.py::test_chunk_dict", "tests/unit/utils/test_collections.py::test_...
null
true
2021-09-29T06:53:21Z
2
39
9
2,787
0
0.85
1
0.85
1
0.5945
91.6585
210
swe_gym::train::1333
swe_gym
train
1,333
pandas-dev__pandas-51538
pandas-dev/pandas
pandas-dev/pandas
python
246a9dd832f21ff2ed3501512d71f1b5c1952382
BUG: comparing pd.Timedelta with timedelta.max fails ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on th...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index ec5d08e75f0e4..80b52d3b3955e 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1190,6 +1190,7 @@ Timedelta - Bug in :func:`to_timedelta` raising error when input has nullable dtype ``Float64`` (:issue:...
diff --git a/pandas/tests/scalar/timedelta/test_arithmetic.py b/pandas/tests/scalar/timedelta/test_arithmetic.py index d67d451e4fc6d..e583de1f489db 100644 --- a/pandas/tests/scalar/timedelta/test_arithmetic.py +++ b/pandas/tests/scalar/timedelta/test_arithmetic.py @@ -966,6 +966,70 @@ def test_td_op_timedelta_timedelta...
["pandas/tests/scalar/timedelta/test_arithmetic.py::TestTimedeltaComparison::test_compare_pytimedelta_bounds2", "pandas/tests/scalar/timedelta/test_arithmetic.py::TestTimedeltaComparison::test_compare_pytimedelta_bounds"]
["pandas/tests/scalar/timedelta/test_arithmetic.py::TestTimedeltaComparison::test_compare_custom_object", "pandas/tests/scalar/timedelta/test_arithmetic.py::TestTimedeltaComparison::test_compare_tick[Hour]", "pandas/tests/scalar/timedelta/test_arithmetic.py::test_ops_notimplemented", "pandas/tests/scalar/timedelta/test...
null
true
2023-02-21T15:52:43Z
2
28
2
3,442
0
0.85
1
0.92
1
0.593333
91.65
211
swe_gym::train::1596
swe_gym
train
1,596
pandas-dev__pandas-57058
pandas-dev/pandas
pandas-dev/pandas
python
622f31c9c455c64751b03b18e357b8f7bd1af0fd
BUG: `Series.pct_change` raises error for empty series ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on ...
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 75445c978d262..d3065cdd8b624 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -14,6 +14,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in :func:`merge...
diff --git a/pandas/tests/series/methods/test_pct_change.py b/pandas/tests/series/methods/test_pct_change.py index 9727ef3d5c27c..6c80e711c3684 100644 --- a/pandas/tests/series/methods/test_pct_change.py +++ b/pandas/tests/series/methods/test_pct_change.py @@ -118,3 +118,11 @@ def test_pct_change_no_warning_na_beginnin...
["pandas/tests/series/methods/test_pct_change.py::test_pct_change_empty"]
["pandas/tests/series/methods/test_pct_change.py::TestSeriesPctChange::test_pct_change_periods_freq[3B-3-None-None]", "pandas/tests/series/methods/test_pct_change.py::TestSeriesPctChange::test_pct_change_periods_freq[7B-7-bfill-3]", "pandas/tests/series/methods/test_pct_change.py::TestSeriesPctChange::test_pct_change",...
null
true
2024-01-24T20:43:04Z
2
28
1
3,004
0
0.85
1
0.92
1
0.593333
91.65
212
swe_bench_verified::test::424
swe_bench_verified
test
424
sphinx-doc__sphinx-9711
sphinx-doc/sphinx
sphinx-doc/sphinx
python
81a4fd973d4cfcb25d01a7b0be62cdb28f82406d
needs_extensions checks versions using strings ### Describe the bug The `needs_extensions` check is handy for verifying minimum extension versions, but it only checks versions in a 'string-like' manner. This means any version >9 is not allowed for any check of something >1. That is, treated as string '0.6' > '0.10', b...
diff --git a/sphinx/extension.py b/sphinx/extension.py --- a/sphinx/extension.py +++ b/sphinx/extension.py @@ -10,6 +10,8 @@ from typing import TYPE_CHECKING, Any, Dict +from packaging.version import InvalidVersion, Version + from sphinx.config import Config from sphinx.errors import VersionRequirementError fro...
diff --git a/tests/test_extension.py b/tests/test_extension.py new file mode 100644 --- /dev/null +++ b/tests/test_extension.py @@ -0,0 +1,31 @@ +""" + test_extension + ~~~~~~~~~~~~~~ + + Test sphinx.extesion module. + + :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + :license: BSD, se...
["tests/test_extension.py::test_needs_extensions"]
[]
null
true
2021-10-06T15:08:03Z
1
15
1
1,507
0
1
1
0.85
1
0.301167
91.6285
213
swe_bench_verified::test::407
swe_bench_verified
test
407
sphinx-doc__sphinx-8593
sphinx-doc/sphinx
sphinx-doc/sphinx
python
07983a5a8704ad91ae855218ecbda1c8598200ca
autodoc: `:meta public:` does not effect to variables **Describe the bug** autodoc: `:meta public:` does not effect to variables. **To Reproduce** ``` # example.py _foo = None #: :meta public: ``` ``` # index.rst .. automodule:: example :members: ``` I expect `_foo` is shown on the built document, but not shown....
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -25,8 +25,8 @@ from sphinx.deprecation import (RemovedInSphinx40Warning, RemovedInSphinx50Warning, RemovedInSphinx60Warning) from s...
diff --git a/tests/roots/test-ext-autodoc/target/private.py b/tests/roots/test-ext-autodoc/target/private.py --- a/tests/roots/test-ext-autodoc/target/private.py +++ b/tests/roots/test-ext-autodoc/target/private.py @@ -9,3 +9,7 @@ def _public_function(name): :meta public: """ + + +PRIVATE_CONSTANT = None #...
["tests/test_ext_autodoc_private_members.py::test_private_field", "tests/test_ext_autodoc_private_members.py::test_private_members"]
["tests/test_ext_autodoc_private_members.py::test_private_field_and_private_members"]
null
true
2020-12-27T02:41:20Z
2
60
2
601
0
1
1
0.85
1
0.300167
91.6255
214
swe_gym::train::1797
swe_gym
train
1,797
pandas-dev__pandas-50232
pandas-dev/pandas
pandas-dev/pandas
python
d05040824e6ab4e1611590a38172880a45dbd92f
WARN: warning shown when parsing delimited date string even if users can't do anything about it ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. -...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 4d3b2548f5fc5..caff9d7f5cb1a 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -775,6 +775,7 @@ Datetimelike - Bug in ``pandas.tseries.holiday.Holiday`` where a half-open date interval causes inconsiste...
diff --git a/pandas/tests/scalar/timestamp/test_timestamp.py b/pandas/tests/scalar/timestamp/test_timestamp.py index 0384417771056..5446e16c189b0 100644 --- a/pandas/tests/scalar/timestamp/test_timestamp.py +++ b/pandas/tests/scalar/timestamp/test_timestamp.py @@ -1082,3 +1082,11 @@ def test_as_unit_non_nano(self): ...
["pandas/tests/scalar/timestamp/test_timestamp.py::test_delimited_date"]
["pandas/tests/scalar/timestamp/test_timestamp.py::TestNonNano::test_sub_timedelta64_mismatched_reso['UTC-02:15'-s]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestNonNano::test_addsub_timedeltalike_non_nano[s-td0]", "pandas/tests/scalar/timestamp/test_timestamp.py::TestTimestampProperties::test_names[es_VE.UTF...
null
true
2022-12-13T13:48:19Z
2
25
1
3,579
0
0.85
1
0.92
1
0.583333
91.62
215
swe_gym::train::1480
swe_gym
train
1,480
pandas-dev__pandas-50464
pandas-dev/pandas
pandas-dev/pandas
python
428c2a6c6159889b7ce213468351989fd702ed5f
ERR: "day out of range" doesn't show position of error ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on ...
diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index 976a53e9117de..48e855f7e9905 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -508,8 +508,8 @@ cpdef array_to_datetime( continue elif is_raise: raise V...
diff --git a/pandas/tests/frame/test_block_internals.py b/pandas/tests/frame/test_block_internals.py index a7f9b14f44674..f2de6b607d737 100644 --- a/pandas/tests/frame/test_block_internals.py +++ b/pandas/tests/frame/test_block_internals.py @@ -259,7 +259,7 @@ def f(dtype): f("float64") # 10822 ...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_datetime_invalid_index[%H:%M:%S-None-values0]", "pandas/tests/tools/test_to_datetime.py::TestTimeConversionFormats::test_to_datetime_parse_timezone_malformed[+01:000:01]", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8601...
["pandas/tests/indexes/datetimes/test_constructors.py::TestTimeSeries::test_from_freq_recreate_from_data[Q]", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_co...
null
true
2022-12-28T12:02:52Z
2
25
82
4,431
0
0.85
1
0.92
1
0.583333
91.62
216
swe_bench_verified::test::399
swe_bench_verified
test
399
sphinx-doc__sphinx-8056
sphinx-doc/sphinx
sphinx-doc/sphinx
python
e188d56ed1248dead58f3f8018c0e9a3f99193f7
Render error when combining multiple input parameters in docstring **Describe the bug & Reproduce** My team is writing a function in Python, which contains 3 inputs that are similar, so we want to put them in the same line in the docstring. As described in 4. Parameters in [numpydoc docstring guide](https://numpydoc....
diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -266,13 +266,16 @@ def _consume_field(self, parse_type: bool = True, prefer_type: bool = False _descs = self.__class__(_descs, self._config).lines() ...
diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -1230,7 +1230,7 @@ class NumpyDocstringTest(BaseDocstringTest): """ Single line summary - :Parameters: * **arg1** (...
["tests/test_ext_napoleon_docstring.py::NumpyDocstringTest::test_multiple_parameters"]
["tests/test_ext_napoleon_docstring.py::NamedtupleSubclassTest::test_attributes_docstring", "tests/test_ext_napoleon_docstring.py::InlineAttributeTest::test_class_data_member", "tests/test_ext_napoleon_docstring.py::InlineAttributeTest::test_class_data_member_inline", "tests/test_ext_napoleon_docstring.py::InlineAttrib...
null
true
2020-08-05T17:18:58Z
1
13
1
1,507
0
1
1
0.85
1
0.2945
91.6085
217
swe_gym::train::1171
swe_gym
train
1,171
pandas-dev__pandas-48164
pandas-dev/pandas
pandas-dev/pandas
python
e65a30e3ebdb7572a943d097882c241789569669
BUG: subset parameter of DataFrameGroupBy.value_counts has no effect ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this ...
take take Sorry. I do not know there is already another pull request exists. I already close my PR. Thanks @LucasG0 for the report. `DataFrameGroupBy.value_counts` added in pandas-1.4.0 (#43564). cc @corriebar adding a 1.4.x milestone as any fix could be considered a backport candidate. contributions and PRs ...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 927841d42b543..e6ff4c65e323f 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -37,6 +37,7 @@ Bug fixes ~~~~~~~~~ - The :class:`errors.FutureWarning` raised when passing arguments (other than ``filepat...
diff --git a/pandas/tests/groupby/test_frame_value_counts.py b/pandas/tests/groupby/test_frame_value_counts.py index 1e679ad4e7aad..8255fbab40dce 100644 --- a/pandas/tests/groupby/test_frame_value_counts.py +++ b/pandas/tests/groupby/test_frame_value_counts.py @@ -738,3 +738,46 @@ def test_ambiguous_grouping(): re...
["pandas/tests/groupby/test_frame_value_counts.py::test_subset_duplicate_columns", "pandas/tests/groupby/test_frame_value_counts.py::test_subset_overlaps_gb_key_raises", "pandas/tests/groupby/test_frame_value_counts.py::test_subset", "pandas/tests/groupby/test_frame_value_counts.py::test_subset_doesnt_exist_in_frame"]
["pandas/tests/groupby/test_frame_value_counts.py::test_against_frame_and_seriesgroupby[True-False-False-None-False-function]", "pandas/tests/groupby/test_frame_value_counts.py::test_data_frame_value_counts_dropna[NoneType-True-True-expected_data0-expected_index0]", "pandas/tests/groupby/test_frame_value_counts.py::tes...
null
true
2022-08-19T18:42:41Z
2
29
4
2,886
0
0.85
1
0.85
1
0.577667
91.608
218
swe_bench_verified::test::356
swe_bench_verified
test
356
scikit-learn__scikit-learn-12973
scikit-learn/scikit-learn
scikit-learn/scikit-learn
python
a7b8b9e9e16d4e15fabda5ae615086c2e1c47d8a
LassoLarsIC: unintuitive copy_X behaviour Hi, I would like to report what seems to be a bug in the treatment of the `copy_X` parameter of the `LassoLarsIC` class. Because it's a simple bug, it's much easier to see in the code directly than in the execution, so I am not posting steps to reproduce it. As you can see her...
diff --git a/sklearn/linear_model/least_angle.py b/sklearn/linear_model/least_angle.py --- a/sklearn/linear_model/least_angle.py +++ b/sklearn/linear_model/least_angle.py @@ -1479,7 +1479,7 @@ def __init__(self, criterion='aic', fit_intercept=True, verbose=False, self.eps = eps self.fit_path = True ...
diff --git a/sklearn/linear_model/tests/test_least_angle.py b/sklearn/linear_model/tests/test_least_angle.py --- a/sklearn/linear_model/tests/test_least_angle.py +++ b/sklearn/linear_model/tests/test_least_angle.py @@ -18,7 +18,7 @@ from sklearn.utils.testing import TempMemmap from sklearn.exceptions import Convergen...
["sklearn/linear_model/tests/test_least_angle.py::test_lasso_lars_fit_copyX_behaviour[False]"]
["sklearn/linear_model/tests/test_least_angle.py::test_simple", "sklearn/linear_model/tests/test_least_angle.py::test_simple_precomputed", "sklearn/linear_model/tests/test_least_angle.py::test_all_precomputed", "sklearn/linear_model/tests/test_least_angle.py::test_lars_lstsq", "sklearn/linear_model/tests/test_least_ang...
null
true
2019-01-13T16:19:52Z
1
10
1
1,563
0
1
1
0.85
1
0.293833
91.6065
219
swe_gym::train::1186
swe_gym
train
1,186
pandas-dev__pandas-56371
pandas-dev/pandas
pandas-dev/pandas
python
3b9d1f6ee5480691410c0702dc4e616fa8aa1bb0
BUG: Resample doesn't work for timestamp[ns][pyarrow] ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on t...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index c878fd2664dc4..aa5de99b69f57 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -644,6 +644,7 @@ Groupby/resample/rolling - Bug in :meth:`DataFrame.asfreq` and :meth:`Series.asfreq` with a :class:`Dateti...
diff --git a/pandas/tests/resample/test_datetime_index.py b/pandas/tests/resample/test_datetime_index.py index 8a725c6e51e3f..760ed35bab678 100644 --- a/pandas/tests/resample/test_datetime_index.py +++ b/pandas/tests/resample/test_datetime_index.py @@ -7,6 +7,8 @@ from pandas._libs import lib from pandas._typing im...
["pandas/tests/resample/test_datetime_index.py::test_arrow_timestamp_resample[None]", "pandas/tests/resample/test_datetime_index.py::test_arrow_timestamp_resample[UTC]", "pandas/tests/resample/test_timedelta.py::test_arrow_duration_resample"]
["pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit[datetime.timezone(datetime.timedelta(seconds=3600))-s-15D-10s]", "pandas/tests/resample/test_datetime_index.py::test_nearest_upsample_with_limit['Asia/Tokyo'-ms-30h-1D]", "pandas/tests/resample/test_datetime_index.py::test_resample_how[fir...
null
true
2023-12-06T23:18:34Z
3
23
3
4,857
0
0.85
1
0.92
1
0.576667
91.6
220
swe_gym::train::1770
swe_gym
train
1,770
pandas-dev__pandas-52036
pandas-dev/pandas
pandas-dev/pandas
python
23c3dc2c379eb325fd4f33be78338730d3f35731
BUG: Unable to write an empty dataframe to parquet ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the ...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 55185afc0a098..74319b0444659 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1295,6 +1295,7 @@ I/O - Bug in :func:`read_csv` when ``engine="pyarrow"`` where ``encoding`` parameter was not handled cor...
diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index 4ba3776bf6063..b55e97a4fe0ae 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -404,25 +404,6 @@ def test_columns_dtypes(self, engine): df.columns = ["foo", "bar"] check_round_trip(...
["pandas/tests/io/test_parquet.py::TestBasic::test_write_column_multiindex_nonstring[fastparquet]", "pandas/tests/io/test_parquet.py::TestParquetPyArrow::test_empty_columns", "pandas/tests/io/test_parquet.py::TestParquetPyArrow::test_columns_dtypes_not_invalid", "pandas/tests/io/test_parquet.py::TestParquetFastParquet:...
["pandas/tests/io/test_parquet.py::TestParquetFastParquet::test_unsupported", "pandas/tests/io/test_parquet.py::test_cross_engine_fp_pa", "pandas/tests/io/test_parquet.py::TestParquetPyArrow::test_categorical", "pandas/tests/io/test_parquet.py::test_options_auto", "pandas/tests/io/test_parquet.py::TestParquetFastParque...
null
true
2023-03-16T21:40:44Z
2
23
9
5,416
0
0.85
1
0.92
1
0.576667
91.6
221
swe_gym::train::1680
swe_gym
train
1,680
pandas-dev__pandas-56948
pandas-dev/pandas
pandas-dev/pandas
python
53525ea1c333579ee612244ddea4958d900844fc
BUG: Left join on index with non-unique values removes name of index ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this ...
take Thanks for the report, confirmed on main. When the caller has distinct values (e.g. `"ID": [1, 2, 3]`), the name of the index remains that of the caller, `ID` in this case. In addition to the left join there seems to be other inconsistencies as well. @rhshadrach - any thoughts on what the result naming behavior...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 0c389719ae01a..d12b46c866dd2 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -113,8 +113,9 @@ Performance improvements Bug fixes ~~~~~~~~~ +- Fixed bug in :meth:`DataFrame.join` inconsistently sett...
diff --git a/pandas/tests/indexes/numeric/test_join.py b/pandas/tests/indexes/numeric/test_join.py index 9839f40861d55..4737af987a04e 100644 --- a/pandas/tests/indexes/numeric/test_join.py +++ b/pandas/tests/indexes/numeric/test_join.py @@ -21,20 +21,14 @@ def test_join_non_unique(self): tm.assert_numpy_array_...
["pandas/tests/indexes/numeric/test_join.py::TestJoinInt64Index::test_join_inner", "pandas/tests/indexes/numeric/test_join.py::TestJoinInt64Index::test_join_right", "pandas/tests/indexes/numeric/test_join.py::TestJoinInt64Index::test_join_left"]
["pandas/tests/indexes/numeric/test_join.py::TestJoinUInt64Index::test_join_inner", "pandas/tests/indexes/numeric/test_join.py::TestJoinInt64Index::test_join_outer", "pandas/tests/indexes/numeric/test_join.py::TestJoinInt64Index::test_join_non_int_index", "pandas/tests/indexes/numeric/test_join.py::TestJoinUInt64Index:...
null
true
2024-01-19T01:02:55Z
3
36
3
2,722
0
0.85
1
0.85
1
0.573667
91.596
222
swe_gym::train::1570
swe_gym
train
1,570
pandas-dev__pandas-48149
pandas-dev/pandas
pandas-dev/pandas
python
cf88cc14787bd4d1c769e269ec5f0469b2eea820
BUG: Pandas Index fails with `bitwise` ufuncs ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the main ...
Thanks @galipremsagar for the report. > For instance `numpy.bitwise_and`, `numpy.bitwise_or` and `numpy.bitwise_xor` are the ones that worked correctly until pandas 1.3.5 and returning wrong results afterwards. first bad commit: [538d2faab186c7405c92a3199e1997cb22b97a33] ENH: implement Index.__array_ufunc__ (#439...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 3414082581b80..2afcdf62a7ef1 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -16,6 +16,7 @@ Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in taking NULL :class:`objects` from a :class:`DataF...
diff --git a/pandas/tests/indexes/test_numpy_compat.py b/pandas/tests/indexes/test_numpy_compat.py index 2704127c7b511..453ece35a68e7 100644 --- a/pandas/tests/indexes/test_numpy_compat.py +++ b/pandas/tests/indexes/test_numpy_compat.py @@ -178,3 +178,16 @@ def test_numpy_ufuncs_reductions(index, func, request): ...
["pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_bitwise[bitwise_or]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_bitwise[bitwise_and]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_bitwise[bitwise_xor]"]
["pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[num_float32-tan]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[num_int32-log]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[timedelta-expm1]", "pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufunc...
null
true
2022-08-19T09:19:47Z
2
19
3
2,985
0
0.85
1
0.85
1
0.560833
91.5575
223
swe_gym::train::1662
swe_gym
train
1,662
pandas-dev__pandas-48847
pandas-dev/pandas
pandas-dev/pandas
python
336896907748389e2cd0d57504508475d425348e
BUG: `add_categories` does not honour `pd.StringDtype` of new categories (and downcasts to `object` instead) ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) ...
Have also just noticed similar behaviour with `rename_categories` ```python c = pd.Categorical(pd.Series(["a", "b", "a"], dtype=pd.StringDtype())) c.rename_categories({"a": "z"}).categories.dtype >>> dtype('O') ``` Here I can understand the downcast if I passed, say `{"a": 1}`, but I would have hoped that as ...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index 9f793532e5e6b..3511f1afe8cfc 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -158,7 +158,7 @@ Bug fixes Categorical ^^^^^^^^^^^ -- +- Bug in :meth:`Categorical.set_categories` losing dtype informat...
diff --git a/pandas/tests/arrays/categorical/test_api.py b/pandas/tests/arrays/categorical/test_api.py index f0669f52acee2..377ab530d8733 100644 --- a/pandas/tests/arrays/categorical/test_api.py +++ b/pandas/tests/arrays/categorical/test_api.py @@ -11,6 +11,7 @@ DataFrame, Index, Series, + StringDtype...
["pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPI::test_add_categories_losing_dtype_information"]
["pandas/tests/arrays/categorical/test_api.py::TestPrivateCategoricalAPI::test_recode_to_categories_large", "pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPI::test_rename_categories_dict", "pandas/tests/arrays/categorical/test_api.py::TestCategoricalAPI::test_rename_categories_wrong_length_raises[new_cat...
null
true
2022-09-29T08:41:16Z
2
21
1
2,934
0
0.85
1
0.85
1
0.559
91.552
224
swe_bench_pro::test::64
swe_bench_pro
test
64
instance_ansible__ansible-5d253a13807e884b7ce0b6b57a963a45e2f0322c-v1055803c3a812189a1133297f7f5468579283f86
ansible/ansible
ansible/ansible
python
14e7f05318ddc421330209eece0e891d0eaef10d
# Password lookup plugin ignores key=value parameters such as `seed`, resulting in non-deterministic output **Summary** The `password` lookup plugin in Ansible does not correctly apply parameters when provided in key=value format (e.g., `seed=myseed`). Although the plugin runs without error, the passed parameters are...
## Requirements - The `chars` option in the `LookupModule` must support both a list of strings and a comma-separated string format. When passed as a string, the value must be split on commas. - If the `chars` string contains the sequence `',,'`, it must be interpreted as a literal comma and preserved in the resulting ...
diff --git a/lib/ansible/plugins/lookup/password.py b/lib/ansible/plugins/lookup/password.py index 855c4b1b9b3689..06ea8b36b16a51 100644 --- a/lib/ansible/plugins/lookup/password.py +++ b/lib/ansible/plugins/lookup/password.py @@ -44,15 +44,18 @@ chars: version_added: "1.4" description: - ...
diff --git a/test/units/plugins/lookup/test_password.py b/test/units/plugins/lookup/test_password.py index 73b50418e18c2c..bb0659bcd53912 100644 --- a/test/units/plugins/lookup/test_password.py +++ b/test/units/plugins/lookup/test_password.py @@ -27,6 +27,7 @@ passlib = None pbkdf2 = None +import os import...
["test/units/plugins/lookup/test_password.py::TestParseParameters::test_invalid_params", "test/units/plugins/lookup/test_password.py::TestParseParameters::test_unrecognized_value", "test/units/plugins/lookup/test_password.py::TestParseParameters::test"]
["test/units/plugins/lookup/test_password.py::TestRandomPassword::test_free_will", "test/units/plugins/lookup/test_password.py::TestRandomPassword::test_seed", "test/units/plugins/lookup/test_password.py::TestFormatContent::test_encrypt_no_salt", "test/units/plugins/lookup/test_password.py::TestRandomPassword::test_uni...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-5d253a13807e884b7ce0b6b57a963a45e2f0322c-v1055803c3a812189a1133297f7f5468579283f86
true
null
1
122
3
1,106
0
0.95
1
0.85
1
0.591
91.548
225
swe_gym::train::1721
swe_gym
train
1,721
pandas-dev__pandas-52058
pandas-dev/pandas
pandas-dev/pandas
python
57c49405f2bd31f797991f2a36dfa0036cb5adfe
BUG: ArrowExtensionArray' object has no attribute 'to_pydatetime when using to_sql command with a dataframe with date columns ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/wha...
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index 2313e28950de7..353da80e27464 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -2091,7 +2091,10 @@ def _dt_round( return self._round_temporally("round", freq, ambiguous, nonexistent)...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 1cdff54cd6df6..a740cb91850d3 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2271,6 +2271,7 @@ def test_dt_to_pydatetime(): result = ser.dt.to_pydatetime() expected =...
["pandas/tests/extension/test_arrow.py::test_dt_to_pydatetime", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_buildin]", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_conn]", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_engine]", "pandas/tes...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-03-17T20:26:04Z
2
17
5
4,975
0
0.85
1
0.92
1
0.556667
91.54
226
swe_gym::train::1700
swe_gym
train
1,700
pandas-dev__pandas-56488
pandas-dev/pandas
pandas-dev/pandas
python
cbe1b321d928bb00ab9809f109ab483db2bb6b2d
BUG: Can't do merge_asof with tolerance and pyarrow dtypes ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 8209525721b98..e1e119a3adf79 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -666,6 +666,7 @@ Reshaping - Bug in :func:`concat` renaming :class:`Series` when ``ignore_index=False`` (:issue:`15047`) -...
diff --git a/pandas/tests/reshape/merge/test_merge_asof.py b/pandas/tests/reshape/merge/test_merge_asof.py index f6278e5e2f38b..b656191cc739d 100644 --- a/pandas/tests/reshape/merge/test_merge_asof.py +++ b/pandas/tests/reshape/merge/test_merge_asof.py @@ -3577,6 +3577,29 @@ def test_merge_asof_extension_dtype(dtype): ...
["pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_pyarrow_td_tolerance"]
["pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_non_numerical_dtype[data1-kwargs0-False]", "pandas/tests/reshape/merge/test_merge_asof.py::TestAsOfMerge::test_by_nullable[UInt64]", "pandas/tests/reshape/merge/test_merge_asof.py::test_merge_asof_non_numerical_dtype[data1-kwargs1-True]", "pandas/tests/re...
null
true
2023-12-13T18:18:04Z
2
17
1
3,213
0
0.85
1
0.92
1
0.556667
91.54
227
swe_bench_pro::test::49
swe_bench_pro
test
49
instance_ansible__ansible-29aea9ff3466e4cd2ed00524b9e56738d568ce8b-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5
ansible/ansible
ansible/ansible
python
270f109bb3af5c2498725b384f77ddc26da2fb73
## Title Constructed inventory: Keyed groups generate useless names with empty values ​​and lack of substitution/omission control ## Description When using `keyed_groups` in the constructed plugin, when the host variable used to construct the group name is empty, useless or inconsistent names are generated. This occ...
## Requirements - Each `keyed_groups` entry in the constructed plugin must accept the `default_value` (string) and `trailing_separator` (boolean, defaulting to `True`) suboptions to handle cases where the value used in the group name is an empty string. - `default_value` and `trailing_separator` are mutually exclusive...
diff --git a/changelogs/fragments/74005-keyed_groups-specific-options-for-empty-value.yml b/changelogs/fragments/74005-keyed_groups-specific-options-for-empty-value.yml new file mode 100644 index 00000000000000..87a240d22e8af9 --- /dev/null +++ b/changelogs/fragments/74005-keyed_groups-specific-options-for-empty-value....
diff --git a/test/integration/targets/inventory_constructed/keyed_group_default_value.yml b/test/integration/targets/inventory_constructed/keyed_group_default_value.yml new file mode 100644 index 00000000000000..e4d0a76b7ea7b1 --- /dev/null +++ b/test/integration/targets/inventory_constructed/keyed_group_default_value....
["test/units/plugins/inventory/test_constructed.py::test_keyed_group_str_with_default_value", "test/units/plugins/inventory/test_constructed.py::test_keyed_group_dict_with_default_value", "test/units/plugins/inventory/test_constructed.py::test_keyed_group_with_trailing_separator", "test/units/plugins/inventory/test_con...
["test/units/plugins/inventory/test_constructed.py::test_keyed_group_str_no_default_value", "test/units/plugins/inventory/test_constructed.py::test_group_by_value_only", "test/units/plugins/inventory/test_constructed.py::test_keyed_parent_groups", "test/units/plugins/inventory/test_constructed.py::test_parent_group_tem...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-29aea9ff3466e4cd2ed00524b9e56738d568ce8b-vba6da65a0f3baefda7a058ebbd0a8dcafb8512f5
true
null
3
61
4
2,309
0
0.95
1
0.85
1
0.588167
91.5395
228
swe_gym::train::1706
swe_gym
train
1,706
pandas-dev__pandas-53856
pandas-dev/pandas
pandas-dev/pandas
python
af804a92ea4fcad8b01e928b6a38bbc2e1a60c84
BUG: to_sql fails with arrow date column ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists on the [main bran...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 7b9efd7f593dd..fbcb4b05ae34a 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -364,12 +364,14 @@ Datetimelike - :meth:`DatetimeIndex.map` with ``na_action="ignore"`` now works as expected. (:issue:`516...
diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 75fcef09535d4..066a68cf9e7c7 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -561,6 +561,7 @@ def test_dataframe_to_sql_arrow_dtypes(conn, request): "datetime": pd.array( [datetime(20...
["pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_str]", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_buildin]", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_engine]", "pandas/tests/io/test_sql.py::test_dataframe_to_sql_arrow_dtypes[sqlite_con...
["pandas/tests/io/test_sql.py::TestSQLiteAlchemy::test_mixed_dtype_insert", "pandas/tests/io/test_sql.py::test_to_sql[None-sqlite_buildin]", "pandas/tests/io/test_sql.py::TestSQLApi::test_sqlalchemy_integer_mapping[uint32-BIGINT]", "pandas/tests/io/test_sql.py::TestSQLiteAlchemy::test_default_date_load", "pandas/tests/...
null
true
2023-06-26T12:15:12Z
2
16
4
5,936
0
0.85
1
0.92
1
0.553333
91.53
229
swe_bench_verified::test::420
swe_bench_verified
test
420
sphinx-doc__sphinx-9602
sphinx-doc/sphinx
sphinx-doc/sphinx
python
6c38f68dae221e8cfc70c137974b8b88bd3baaab
Nitpick flags Literal annotation values as missing py:class ### Describe the bug When a value is present in a type annotation as `Literal`, sphinx will treat the value as a `py:class`. With nitpick enabled, values like `Literal[True]` end up failing, because `True` is not a class. This is a problem for builds which w...
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -123,7 +123,7 @@ def unparse(node: ast.AST) -> List[Node]: if node.value is Ellipsis: return [addnodes.desc_sig_punctuation('', "...")] else: - ...
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -342,6 +342,27 @@ def test_parse_annotation(app): assert_node(doctree[0], pending_xref, refdomain="py", reftype="obj", reftarget="None") +@pytest.mark.skipif(sys.version_info < (3, 8), ...
["tests/test_domain_py.py::test_parse_annotation_Literal"]
["tests/test_domain_py.py::test_function_signatures", "tests/test_domain_py.py::test_domain_py_xrefs", "tests/test_domain_py.py::test_domain_py_xrefs_abbreviations", "tests/test_domain_py.py::test_domain_py_objects", "tests/test_domain_py.py::test_resolve_xref_for_properties", "tests/test_domain_py.py::test_domain_py_f...
null
true
2021-09-01T17:26:58Z
1
12
1
1,358
0
1
1
0.85
1
0.266333
91.524
230
swe_bench_verified::test::9
swe_bench_verified
test
9
astropy__astropy-14309
astropy/astropy
astropy/astropy
python
cdb66059a2feb44ee49021874605ba90801f9986
IndexError: tuple index out of range in identify_format (io.registry) ### Description Cron tests in HENDRICS using identify_format have started failing in `devdeps` (e.g. [here](https://github.com/StingraySoftware/HENDRICS/actions/runs/3983832171/jobs/6829483945)) with this error: ``` File "/home/runner/work/HENDRIC...
cc @nstarman from #14274
diff --git a/astropy/io/fits/connect.py b/astropy/io/fits/connect.py --- a/astropy/io/fits/connect.py +++ b/astropy/io/fits/connect.py @@ -65,10 +65,9 @@ def is_fits(origin, filepath, fileobj, *args, **kwargs): fileobj.seek(pos) return sig == FITS_SIGNATURE elif filepath is not None: - if ...
diff --git a/astropy/io/fits/tests/test_connect.py b/astropy/io/fits/tests/test_connect.py --- a/astropy/io/fits/tests/test_connect.py +++ b/astropy/io/fits/tests/test_connect.py @@ -7,7 +7,14 @@ from astropy import units as u from astropy.io import fits -from astropy.io.fits import BinTableHDU, HDUList, ImageHDU, ...
["astropy/io/fits/tests/test_connect.py::test_is_fits_gh_14305"]
["astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_pathlib", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_meta", "astropy/io/fits/tests/test_connect.py::TestSingleTable::test_simple_meta_conflicting", "astr...
null
true
2023-01-23T22:34:01Z
1
5
1
3,261
0
1
1
0.92
0.8
0.516667
91.52
231
swe_bench_verified::test::333
swe_bench_verified
test
333
pytest-dev__pytest-5262
pytest-dev/pytest
pytest-dev/pytest
python
58e6a09db49f34886ff13f3b7520dd0bcd7063cd
_pytest.capture.EncodedFile mode should not include `b` (binary) - [x] a detailed description of the bug or suggestion Exception when youtube-dl logs to pytest captured output. Youtube-dl looks for `b` in `out.mode` to decide whether to writes `bytes` or `str`. `_pytest.capture.EncodedFile` incorrectly advertises `rb...
here's where this comes from: https://github.com/pytest-dev/pytest/blob/6a43c8cd9405c68e223f4c6270bd1e1ac4bc8c5f/src/_pytest/capture.py#L450-L451 Probably an easy fix to ```python @property def mode(self): return self.buffer.mode.replace('b', '') ``` Want to supply a PR with a quick test demonstrating ...
diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py --- a/src/_pytest/capture.py +++ b/src/_pytest/capture.py @@ -447,6 +447,10 @@ def name(self): """Ensure that file.name is a string.""" return repr(self.buffer) + @property + def mode(self): + return self.buffer.mode.replace("...
diff --git a/testing/test_capture.py b/testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -1051,6 +1051,9 @@ def test_simple_resume_suspend(self, tmpfile): cap.done() pytest.raises(AttributeError, cap.suspend) + def test_capfd_sys_stdout_mode(self, capf...
["testing/test_capture.py::TestFDCapture::test_capfd_sys_stdout_mode"]
["[100%]", "testing/test_capture.py::TestCaptureManager::test_getmethod_default_no_fd", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[no]", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[sys]", "testing/test_capture.py::TestCaptureManager::test_capturing_basic_api[fd]", ...
null
true
2019-05-14T21:54:55Z
1
4
1
4,394
0
1
1
0.92
0.8
0.513333
91.51
232
swe_gym::train::276
swe_gym
train
276
getmoto__moto-7119
getmoto/moto
getmoto/moto
python
2522bc495d71603fb6d38c41a34e6e9b122f27a1
bug: describe-availability-zones filtering does not work # Problem `describe-availability-zones` returns all of the AZs in a region rather than the single, expected, filtered one. # Reproduction Reproduction can be done easily with AWS CLI and endpoint set to the moto-server host:port. I also see the same issues in Te...
Hi @jrindy-iterable, thanks for raising this, and welcome to Moto! We currently support the following filters: - zone-id - zone-type - zone-name - region-name I'll mark it as an enhancement to also support the `zone-id`/`zone-name` parameters and the `status` filter. > aws --endpoint=http://localhost:5000...
diff --git a/moto/ec2/models/availability_zones_and_regions.py b/moto/ec2/models/availability_zones_and_regions.py --- a/moto/ec2/models/availability_zones_and_regions.py +++ b/moto/ec2/models/availability_zones_and_regions.py @@ -24,6 +24,7 @@ def __init__( self.region_name = region_name self.zone_id...
diff --git a/tests/test_ec2/test_availability_zones_and_regions.py b/tests/test_ec2/test_availability_zones_and_regions.py --- a/tests/test_ec2/test_availability_zones_and_regions.py +++ b/tests/test_ec2/test_availability_zones_and_regions.py @@ -38,6 +38,45 @@ def test_boto3_availability_zones(): assert r...
["tests/test_ec2/test_availability_zones_and_regions.py::test_availability_zones__parameters"]
["tests/test_ec2/test_availability_zones_and_regions.py::test_describe_availability_zones_dryrun", "tests/test_ec2/test_availability_zones_and_regions.py::test_boto3_availability_zones", "tests/test_ec2/test_availability_zones_and_regions.py::test_boto3_describe_regions", "tests/test_ec2/test_availability_zones_and_reg...
null
true
2023-12-11 23:45:48
2
19
1
2,885
0
0.85
1
0.85
1
0.544167
91.5075
233
swe_gym::train::1398
swe_gym
train
1,398
pandas-dev__pandas-48073
pandas-dev/pandas
pandas-dev/pandas
python
60b44004919d85446236a73edff83cad9fc7851e
DEPR: `sort_columns` in `plot` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists on the main branch of panda...
Hi, thanks for your report. This is currently ignored completly. Plotly does not support this at all. I think deprecating might make sense here, since this can be easily accomplished beforehand Okay, cool, seems like a reasonable solution. Thanks. take
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index b71d294b97f9a..7fe970ef36e14 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -845,6 +845,7 @@ Other Deprecations - Deprecated unused arguments ``encoding`` and ``verbose`` in :meth:`Series.to_excel` a...
diff --git a/pandas/tests/plotting/frame/test_frame.py b/pandas/tests/plotting/frame/test_frame.py index 538c9c2fb5059..b38c9adb0a893 100644 --- a/pandas/tests/plotting/frame/test_frame.py +++ b/pandas/tests/plotting/frame/test_frame.py @@ -2215,6 +2215,19 @@ def test_secondary_y(self, secondary_y): as...
["pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_sort_columns_deprecated"]
["pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_line_area_stacked[line]", "pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_bad_label", "pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::test_xcompat", "pandas/tests/plotting/frame/test_frame.py::TestDataFramePlots::...
null
true
2022-08-13T20:28:00Z
2
18
1
2,893
0
0.85
1
0.85
1
0.542167
91.5015
234
swe_gym::train::1178
swe_gym
train
1,178
pandas-dev__pandas-56487
pandas-dev/pandas
pandas-dev/pandas
python
809b97f4c2baaabae898e0a46d63ee9279f31772
BUG: `DataFrame.sort_index` is failing when `axis='columns'` and `ignore_index=True` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index ff79100ed1fe1..9c3a46339769f 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -704,9 +704,10 @@ Other - Bug in :func:`infer_freq` and :meth:`DatetimeIndex.inferred_freq` with weekly frequencies and non...
diff --git a/pandas/tests/frame/methods/test_sort_index.py b/pandas/tests/frame/methods/test_sort_index.py index f0222e5cec9b5..49e292057e4dc 100644 --- a/pandas/tests/frame/methods/test_sort_index.py +++ b/pandas/tests/frame/methods/test_sort_index.py @@ -994,3 +994,11 @@ def test_sort_index_with_sliced_multiindex(): ...
["pandas/tests/frame/methods/test_sort_index.py::test_axis_columns_ignore_index"]
["pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level2", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_categorical_index", "pandas/tests/frame/methods/test_sort_index.py::TestDataFrameSortIndex::test_sort_index_level_mixed", "pandas/test...
null
true
2023-12-13T17:49:15Z
2
13
1
5,493
0
0.85
1
0.92
1
0.543333
91.5
235
swe_gym::train::1807
swe_gym
train
1,807
pandas-dev__pandas-50238
pandas-dev/pandas
pandas-dev/pandas
python
749d59db6e5935f4b3ddf371e79dacc00fcad1c0
REGR: to_datetime with non-ISO format, float, and nan fails on main ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this b...
diff --git a/doc/source/whatsnew/v1.5.3.rst b/doc/source/whatsnew/v1.5.3.rst index 581d28e10bd67..c0df15b67a4a7 100644 --- a/doc/source/whatsnew/v1.5.3.rst +++ b/doc/source/whatsnew/v1.5.3.rst @@ -19,6 +19,7 @@ Fixed regressions - Enforced reversion of ``color`` as an alias for ``c`` and ``size`` as an alias for ``s``...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 48844beed30f4..c4c60b6c4231e 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -135,6 +135,17 @@ def test_to_datetime_format_YYYYMMDD_with_nat(self, cache): resul...
["pandas/tests/tools/test_to_datetime.py::TestTimeConversionFormats::test_to_datetime_format_YYYYMM_with_nat[True]", "pandas/tests/tools/test_to_datetime.py::TestTimeConversionFormats::test_to_datetime_format_YYYYMM_with_nat[False]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-12-13T18:08:55Z
2
13
2
5,425
0
0.85
1
0.92
1
0.543333
91.5
236
swe_gym::train::1339
swe_gym
train
1,339
pandas-dev__pandas-48970
pandas-dev/pandas
pandas-dev/pandas
python
c34da509497717308c97c4a211ad3ff9bab92d87
BUG: to_datetime(..., infer_datetime_format=True) fails if argument is np.str_ ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confi...
diff --git a/pandas/_libs/tslibs/parsing.pyx b/pandas/_libs/tslibs/parsing.pyx index 763530520cd29..51bb21404e7b5 100644 --- a/pandas/_libs/tslibs/parsing.pyx +++ b/pandas/_libs/tslibs/parsing.pyx @@ -963,10 +963,6 @@ def guess_datetime_format(dt_str: str, bint dayfirst=False) -> str | None: datetime format st...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 5c6b4c2434b88..3d59e115d4cf9 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -468,8 +468,10 @@ def test_to_datetime_mixed_datetime_and_string(self): expected = ...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_np_str[True]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-10-06T12:24:33Z
2
13
1
3,881
0
0.85
1
0.92
1
0.543333
91.5
237
swe_gym::train::1320
swe_gym
train
1,320
pandas-dev__pandas-54186
pandas-dev/pandas
pandas-dev/pandas
python
406abd95647386d136000613b6a754d40e90d0df
BUG: HDFStore select where condition doesn't work for large integer ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this b...
Yes, this is clearly a bug. take
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 6c2784bc93b0c..b0c2b845073f6 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -481,7 +481,7 @@ Conversion - Bug in :meth:`DataFrame.__repr__` incorrectly raising a ``TypeError`` when the dtype of a col...
diff --git a/pandas/tests/io/pytables/test_select.py b/pandas/tests/io/pytables/test_select.py index f14a3ad7c5e10..8d9e0b9f5ffec 100644 --- a/pandas/tests/io/pytables/test_select.py +++ b/pandas/tests/io/pytables/test_select.py @@ -914,7 +914,7 @@ def test_query_compare_column_type(setup_path): if col...
["pandas/tests/io/pytables/test_select.py::test_select_large_integer"]
["pandas/tests/io/pytables/test_select.py::test_select_empty_where[where2]", "pandas/tests/io/pytables/test_select.py::test_frame_select_complex", "pandas/tests/io/pytables/test_select.py::test_select_empty_where[where1]", "pandas/tests/io/pytables/test_select.py::test_query_compare_column_type", "pandas/tests/io/pytab...
null
true
2023-07-19T03:03:28Z
2
15
1
2,948
0
0.85
1
0.85
1
0.541333
91.499
238
swe_gym::train::1325
swe_gym
train
1,325
pandas-dev__pandas-53641
pandas-dev/pandas
pandas-dev/pandas
python
984d75543fce5c68f0dcc4f0b3500256e4a9c0c9
BUG: `pd.concat` dataframes with different datetime64 types ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [ ] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exist...
diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index b489c14ac0c42..9ec662a6cd352 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -129,7 +129,16 @@ def concat_compat( # i.e. isinstance(to_concat[0], ExtensionArray) to_concat_eas = cast("Sequenc...
diff --git a/pandas/tests/reshape/concat/test_datetimes.py b/pandas/tests/reshape/concat/test_datetimes.py index 71606fb72c0f6..fe8e243919d05 100644 --- a/pandas/tests/reshape/concat/test_datetimes.py +++ b/pandas/tests/reshape/concat/test_datetimes.py @@ -19,6 +19,22 @@ ) import pandas._testing as tm +UNITS = ["s"...
["pandas/tests/reshape/concat/test_datetimes.py::TestTimezoneConcat::test_concat_tz_series4[ns-us]", "pandas/tests/reshape/concat/test_datetimes.py::TestTimezoneConcat::test_concat_tz_series5[ns-ms]", "pandas/tests/reshape/concat/test_datetimes.py::TestTimezoneConcat::test_concat_tz_series4[us-ms]", "pandas/tests/resha...
["pandas/tests/reshape/concat/test_datetimes.py::TestPeriodConcat::test_concat_period_other_series3", "pandas/tests/reshape/concat/test_datetimes.py::TestDatetimeConcat::test_concat_datetime_datetime64_frame", "pandas/tests/reshape/concat/test_datetimes.py::TestTimezoneConcat::test_concat_tz_series4[ns-ns]", "pandas/te...
null
true
2023-06-13T06:55:50Z
1
11
48
4,225
0
0.85
1
0.92
1
0.536667
91.48
239
swe_gym::train::1135
swe_gym
train
1,135
pandas-dev__pandas-53391
pandas-dev/pandas
pandas-dev/pandas
python
90c42d22a7266fc6071696d4b7652b0e8c3d1d84
BUG: Reading fails when `dtype` is defined with `bool[pyarrow]` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug e...
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 73779d7e4cc74..a25999d8085cb 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -20,7 +20,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Bug in :func:`read_csv` when defining ``dtype`` with ``bool[p...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 9129e84700a55..a0d15c70b5720 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -47,6 +47,7 @@ import pandas as pd import pandas._testing as tm +from pandas.api.extensions impo...
["pandas/tests/extension/test_arrow.py::TestBaseParsing::test_EA_types[bool-python-pyarrow]", "pandas/tests/extension/test_arrow.py::TestBaseParsing::test_EA_types[bool-c-_NoDefault.no_default]", "pandas/tests/extension/test_arrow.py::TestBaseParsing::test_EA_types[bool-c-pyarrow]", "pandas/tests/extension/test_arrow.p...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-05-25T21:06:18Z
3
11
4
5,365
0
0.85
1
0.92
1
0.536667
91.48
240
swe_gym::train::1707
swe_gym
train
1,707
pandas-dev__pandas-53495
pandas-dev/pandas
pandas-dev/pandas
python
d2cd5e21f85ac4c5e47ce2af703fa76feaf0478c
BUG: `RangeIndex.union` not sorting results when `sort=True` in pandas-2.0 ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed...
Thanks could you provide `idx1` and `idx2`? @mroeschke Apologies for missing out the full repro. Updated the example above.
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 89c64b02e0cb5..3da469c2e1fe6 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -21,6 +21,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ +- Bug in :func:`RangeIndex.union` when using ``sort=True`` with an...
diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 80fa78ccdc97e..8d75c1bf73778 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -577,6 +577,43 @@ def test_union_nan_in_both(dup): tm.assert_index_equal(result, expected) +def...
["pandas/tests/indexes/test_setops.py::test_union_rangeindex_sort_true"]
["pandas/tests/indexes/test_setops.py::test_union_different_types[int8-uint8]", "pandas/tests/indexes/test_setops.py::test_union_different_types[nullable_bool-int64]", "pandas/tests/indexes/test_setops.py::test_setop_with_categorical[uint32-False-symmetric_difference]", "pandas/tests/indexes/test_setops.py::TestSetOps:...
null
true
2023-06-01T22:56:25Z
3
14
1
2,921
0
0.85
1
0.85
1
0.5335
91.4755
241
swe_gym::train::1556
swe_gym
train
1,556
pandas-dev__pandas-47475
pandas-dev/pandas
pandas-dev/pandas
python
55064763e8ba55f6ff5370a8dd083767a189d7a4
BUG: uint16 inserted as int16 when assigning row with dict ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists...
Thanks @bluss for the report note working in pandas-1.2.5, albeit retaining object dtype from empty DataFrame and then in pandas-1.3.5 overflow but still with object dtype and then in pandas-1.4.2/main overflow but changed (incorrect) dtype. ```python print(pd.__version__) df = pd.DataFrame(columns=["actual", "...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 7aa1c1e84aa09..f19cc88fa1690 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -857,6 +857,7 @@ Conversion - Bug in :meth:`DataFrame.to_records` returning inconsistent numpy types if the index was a :cl...
diff --git a/pandas/tests/dtypes/test_inference.py b/pandas/tests/dtypes/test_inference.py index b12476deccbfc..8fe6abd3b0ed5 100644 --- a/pandas/tests/dtypes/test_inference.py +++ b/pandas/tests/dtypes/test_inference.py @@ -700,25 +700,32 @@ def test_convert_int_overflow(self, value): result = lib.maybe_conve...
["pandas/tests/frame/test_constructors.py::TestDataFrameConstructors::test_constructor_numpy_uints[values4]", "pandas/tests/dtypes/test_inference.py::TestInference::test_maybe_convert_objects_uint[value6-uint32]", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_constructor_numpy_uints[values3]",...
["pandas/tests/indexes/numeric/test_numeric.py::TestIntNumericIndex::test_argsort[index_inc-int64]", "pandas/tests/frame/test_constructors.py::TestDataFrameConstructors::test_dict_nocopy[Float32-M8[ns]-False]", "pandas/tests/dtypes/test_inference.py::test_is_list_like[DataFrame]", "pandas/tests/dtypes/test_inference.py...
null
true
2022-06-22T23:19:59Z
2
29
24
2,599
0
0.85
1
0.85
1
0.529833
91.4645
242
swe_gym::train::1779
swe_gym
train
1,779
pandas-dev__pandas-53189
pandas-dev/pandas
pandas-dev/pandas
python
45eb702c2a38216231ba7c02214e7659aa0eb5ef
BUG: Series.rename(scalar, copy=False) still copies data ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists o...
take the gist of the issue is that `_set_name` ( in the else portion ) doesn't support `copy` param and solely relies on `inplace` param. Hence the `copy` param supplied to rename is just ignored in this case. Some possible solutions here would be - 1. In the else portion, determine `inplace` based on `copy` ( in ...
diff --git a/doc/source/whatsnew/v2.0.2.rst b/doc/source/whatsnew/v2.0.2.rst index 0d6647dc38b3c..8ef733f825d00 100644 --- a/doc/source/whatsnew/v2.0.2.rst +++ b/doc/source/whatsnew/v2.0.2.rst @@ -31,6 +31,7 @@ Bug fixes - Bug in :meth:`DataFrame.__getitem__` not preserving dtypes for :class:`MultiIndex` partial keys ...
diff --git a/pandas/tests/copy_view/test_methods.py b/pandas/tests/copy_view/test_methods.py index 68b41682ab411..67fc91e0567ef 100644 --- a/pandas/tests/copy_view/test_methods.py +++ b/pandas/tests/copy_view/test_methods.py @@ -141,6 +141,7 @@ def test_methods_copy_keyword( "method", [ lambda ser, c...
["pandas/tests/copy_view/test_methods.py::test_methods_series_copy_keyword[rename-False]"]
["pandas/tests/copy_view/test_methods.py::test_methods_series_copy_keyword[tz_convert-False]", "pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItemBooleanMask::test_setitem_ea_boolean_mask", "pandas/tests/copy_view/test_methods.py::test_xs[single-block-1-a]", "pandas/tests/copy_view/test_methods.py::test_...
null
true
2023-05-11T22:23:39Z
2
13
1
2,918
0
0.85
1
0.85
1
0.529667
91.464
243
swe_gym::train::1912
swe_gym
train
1,912
facebookresearch__hydra-2011
facebookresearch/hydra
facebookresearch/hydra
python
0570bb78637cb444aad4b2a28b4733da072a79e9
[Bug] Hydra's exception formatting cannot handle exception raised in C extension # 🐛 Bug ## Description I use `hydra` and `av`(PyAV), when `av` raise an error inside my hydra app, hydra cannot handle it correctly. Because `inspect.getmodule` won't work for C extension. ```python end: Optional[TracebackType] = tb num_f...
diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py --- a/hydra/_internal/utils.py +++ b/hydra/_internal/utils.py @@ -4,10 +4,10 @@ import logging.config import os import sys +import traceback import warnings from dataclasses import dataclass from os.path import dirname, join, normpath, realpath -fro...
diff --git a/tests/test_utils.py b/tests/test_utils.py --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -4,7 +4,7 @@ import re from pathlib import Path from textwrap import dedent -from typing import Any, Optional +from typing import Any, NoReturn, Optional from unittest.mock import patch from omegaconf im...
["tests/test_utils.py::TestRunAndReport::test_simplified_traceback_with_no_module", "tests/test_utils.py::TestRunAndReport::test_simplified_traceback_failure"]
["tests/test_utils.py::TestRunAndReport::test_success", "tests/test_utils.py::test_deprecation_warning[env_set]", "tests/test_utils.py::test_to_absolute_path[/home/omry/hydra/-/foo/bar-/foo/bar]", "tests/test_utils.py::test_to_absolute_path[/home/omry/hydra-foo/bar-/home/omry/hydra/foo/bar]", "tests/test_utils.py::test...
null
true
2022-02-03T20:57:52Z
1
9
2
3,966
0
0.85
1
0.92
1
0.53
91.46
244
swe_gym::train::1204
swe_gym
train
1,204
pandas-dev__pandas-52446
pandas-dev/pandas
pandas-dev/pandas
python
3ce07cb46986ce59427b601c6878c81633e436eb
BUG: error when unstacking in DataFrame.groupby.apply ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on t...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 743bb78c70c36..845fa5dfde428 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -295,6 +295,7 @@ Groupby/resample/rolling or :class:`PeriodIndex`, and the ``groupby`` method was given a function as its...
diff --git a/pandas/tests/groupby/test_apply.py b/pandas/tests/groupby/test_apply.py index 0699b7c1369f2..b56ce326d1962 100644 --- a/pandas/tests/groupby/test_apply.py +++ b/pandas/tests/groupby/test_apply.py @@ -1203,6 +1203,26 @@ def test_groupby_apply_shape_cache_safety(): tm.assert_frame_equal(result, expected...
["pandas/tests/groupby/test_apply.py::test_groupby_apply_to_series_name"]
["pandas/tests/groupby/test_apply.py::test_apply_index_has_complex_internals[index1]", "pandas/tests/groupby/test_apply.py::test_apply_fast_slow_identical", "pandas/tests/groupby/test_apply.py::test_group_apply_once_per_group[GH2656]", "pandas/tests/groupby/test_apply.py::test_apply_corner", "pandas/tests/groupby/test_...
null
true
2023-04-05T13:32:11Z
2
9
1
3,006
0
0.85
1
0.92
1
0.53
91.46
245
swe_gym::train::100
swe_gym
train
100
getmoto__moto-5118
getmoto/moto
getmoto/moto
python
ae6b28b5b912539f1aa1039f65babfa8b4811d3c
[dynamodb2] `put_item` with an empty set as an attribute does not throw ValidationException Hey! Thanks for a great library. It makes unit tests really easy to write! This is similar to #1129 and #1744. Tested on moto version `==2.3.2` DynamoDB [does not allow](https://docs.aws.amazon.com/amazondynamodb/latest/develo...
Thanks for raising this @schatten!
diff --git a/moto/dynamodb/responses.py b/moto/dynamodb/responses.py --- a/moto/dynamodb/responses.py +++ b/moto/dynamodb/responses.py @@ -81,22 +81,23 @@ def put_has_empty_keys(field_updates, table): return False -def get_empty_str_error(): - er = "com.amazonaws.dynamodb.v20111205#ValidationException" - ...
diff --git a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py --- a/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py +++ b/tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py @@ -579,3 +579,23 @@ def test_put_item_wrong_datatype(): ...
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_put_item_empty_set"]
["tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_query_gsi_with_wrong_key_attribute_names_throws_exception", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_hash_key_can_only_use_equals_operations[<]", "tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py::test_creating_table_w...
null
true
2022-05-10 22:30:33
1
41
1
2,346
0
0.85
1
0.85
1
0.527667
91.458
246
swe_gym::train::1462
swe_gym
train
1,462
pandas-dev__pandas-51790
pandas-dev/pandas
pandas-dev/pandas
python
c71645fff865c29e77bb81bd9510dba97d93a67c
PeriodDType should require freq argument #### Code Sample, a copy-pastable example if possible ```python >>> import pandas as pd >>> pd.PeriodDtype() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/tesla/Projects/pandas/pandas/core/dtypes/dtypes.py", line 149, in __repr__ ret...
I think this makes sense though @jbrockmendel or @jschendel might have additional input. FWIW there is a comment about pickle compat driving the None handling in the past. We just upped our minimum pickle compat so *maybe* not an issue anymore: https://github.com/pandas-dev/pandas/blob/269d36814e471880627109a5e5e...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 2ac20e97409e7..987807a4d7265 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -178,7 +178,8 @@ I/O Period ^^^^^^ -- +- Bug in :class:`PeriodDtype` constructor failing to raise ``TypeError`` when no ...
diff --git a/pandas/tests/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index 590cedeb6b373..9057d91b1960a 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -517,11 +517,16 @@ def test_basic(self, dtype): assert not is_period_dtype(np.dtype("float64")) ...
["pandas/tests/dtypes/test_dtypes.py::TestPeriodDtype::test_freq_argument_required"]
["pandas/tests/dtypes/test_dtypes.py::test_is_bool_dtype[dtype5-False]", "pandas/tests/dtypes/test_dtypes.py::TestCategoricalDtypeParametrized::test_update_dtype[True-True-new_categories2]", "pandas/tests/dtypes/test_dtypes.py::TestCategoricalDtypeParametrized::test_basic[False-categories4]", "pandas/tests/dtypes/test_...
null
true
2023-03-04T22:43:24Z
2
19
1
2,785
0
0.85
1
0.85
1
0.5275
91.4575
247
swe_gym::train::1766
swe_gym
train
1,766
pandas-dev__pandas-49161
pandas-dev/pandas
pandas-dev/pandas
python
5a4339f686225ed5eadc5c4b7d2508c0765ef577
BUG: wrong values produced when setting using .loc ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the ...
The issue seems to be caused by this line https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexing.py#L1902 ```python # note that this coerces the dtype if we are mixed # GH 7551 value = np.array(value, dtype=object) ``` I think it's the same problem described in this numpy issue https://github.com...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 3c600e8e747ad..a6c6afb9734c9 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -220,6 +220,7 @@ Interval Indexing ^^^^^^^^ - Bug in :meth:`DataFrame.reindex` filling with wrong values when indexing co...
diff --git a/pandas/tests/frame/indexing/test_coercion.py b/pandas/tests/frame/indexing/test_coercion.py index c970558162707..0e154d0e1d42b 100644 --- a/pandas/tests/frame/indexing/test_coercion.py +++ b/pandas/tests/frame/indexing/test_coercion.py @@ -20,7 +20,6 @@ class TestDataFrameSetitemCoercion: - @pytest...
["pandas/tests/indexing/test_indexing.py::TestFancy::test_multi_assign", "pandas/tests/frame/indexing/test_coercion.py::test_iloc_setitem_unnecesssary_float_upcasting", "pandas/tests/frame/indexing/test_coercion.py::TestDataFrameSetitemCoercion::test_loc_setitem_multiindex_columns[True]", "pandas/tests/frame/indexing/t...
["pandas/tests/indexing/test_indexing.py::TestDatetimelikeCoercion::test_setitem_dt64_string_values[<UTC>-setitem-key1-Index]", "pandas/tests/indexing/test_loc.py::TestLocWithEllipsis::test_loc_iloc_getitem_ellipses_only_one_ellipsis[iloc-DataFrame-bool-dtype]", "pandas/tests/indexing/test_indexing.py::TestDatetimelike...
null
true
2022-10-17T22:07:25Z
2
13
5
2,891
0
0.85
1
0.85
1
0.525167
91.4505
248
swe_gym::train::1811
swe_gym
train
1,811
pandas-dev__pandas-50109
pandas-dev/pandas
pandas-dev/pandas
python
03a981ae61e685bb6c35234a6fb78a68373af0c6
BUG: datetime.date objects don't get parsed for non-ISO formats ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug e...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 57558491e0e57..f88dc67da72ad 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -698,7 +698,7 @@ Datetimelike - Bug in subtracting a ``datetime`` scalar from :class:`DatetimeIndex` failing to retain the ...
diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py index 0e9c8a3ce487b..374db17714b06 100644 --- a/pandas/tests/tools/test_to_datetime.py +++ b/pandas/tests/tools/test_to_datetime.py @@ -3,6 +3,7 @@ import calendar from collections import deque from datetime import ( + da...
["pandas/tests/tools/test_to_datetime.py::TestToDatetime::test_to_datetime_mixed_date_and_string[non-ISO8601]"]
["pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers_timezone_minute_offsets_roundtrip[False-2013-01-01", "pandas/tests/tools/test_to_datetime.py::TestDatetimeParsingWrappers::test_parsers[True-2005/11/09", "pandas/tests/tools/test_to_datetime.py::TestToDatetimeMisc::test_to_datetime_iso8...
null
true
2022-12-07T18:15:24Z
2
8
1
3,369
0
0.85
1
0.92
1
0.526667
91.45
249
swe_gym::train::2392
swe_gym
train
2,392
modin-project__modin-7193
modin-project/modin
modin-project/modin
python
6d64e08fc8e124b7a6ba2aecd4062dfe7fef90f1
BUG: idxmax and idxmin do not allow string columns when numeric_only=False ### Modin version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the latest released version of Modin. - [X] I have confirmed this bug exists on the main branch of Modin. (...
diff --git a/modin/pandas/base.py b/modin/pandas/base.py --- a/modin/pandas/base.py +++ b/modin/pandas/base.py @@ -1868,8 +1868,6 @@ def idxmax(self, axis=0, skipna=True, numeric_only=False): # noqa: PR01, RT01, """ Return index of first occurrence of maximum over requested axis. """ - ...
diff --git a/modin/tests/pandas/dataframe/test_reduce.py b/modin/tests/pandas/dataframe/test_reduce.py --- a/modin/tests/pandas/dataframe/test_reduce.py +++ b/modin/tests/pandas/dataframe/test_reduce.py @@ -220,6 +220,14 @@ def test_idxmin_idxmax(data, axis, skipna, is_transposed, method): ) +@pytest.mark.para...
["modin/tests/pandas/dataframe/test_reduce.py::test_idxmin_idxmax_string_columns[0]", "modin/tests/pandas/dataframe/test_reduce.py::test_idxmin_idxmax_string_columns[1]"]
["modin/tests/pandas/dataframe/test_reduce.py::test_reduce_specific[True-0-var]", "modin/tests/pandas/dataframe/test_reduce.py::test_min_max_mean[data0-over_rows_int-True-True-False-max]", "modin/tests/pandas/dataframe/test_reduce.py::test_sum_prod_specific[min_count_1-False-prod]", "modin/tests/pandas/dataframe/test_r...
null
true
2024-04-16T20:01:57Z
3
8
2
4,732
0
0.85
1
0.92
1
0.526667
91.45
250
swe_gym::train::1309
swe_gym
train
1,309
pandas-dev__pandas-51741
pandas-dev/pandas
pandas-dev/pandas
python
376f77da131bb45147ea67009b65ffbad59e4945
BUG: `pd.concat` fails with `GroupBy.head()` and `pd.StringDtype["pyarrow"]` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirm...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 15e3d66ecc551..374a1e43daa11 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1249,6 +1249,7 @@ Indexing - Bug in :meth:`DataFrame.compare` does not recognize differences when comparing ``NA`` with va...
diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py index a82a00d3de70a..f2f0aaffcd6b5 100644 --- a/pandas/_testing/__init__.py +++ b/pandas/_testing/__init__.py @@ -253,6 +253,7 @@ else: FLOAT_PYARROW_DTYPES_STR_REPR = [] ALL_INT_PYARROW_DTYPES_STR_REPR = [] + ALL_PYARROW_DTYPES = [] ...
["pandas/tests/extension/test_arrow.py::test_concat_empty_arrow_backed_series[int64]", "pandas/tests/extension/test_arrow.py::test_concat_empty_arrow_backed_series[duration[ns]]", "pandas/tests/extension/test_arrow.py::test_concat_empty_arrow_backed_series[timestamp[s]]", "pandas/tests/extension/test_arrow.py::test_con...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-03-02T10:18:55Z
2
8
32
4,220
0
0.85
1
0.92
1
0.526667
91.45
251
swe_gym::train::1359
swe_gym
train
1,359
pandas-dev__pandas-57985
pandas-dev/pandas
pandas-dev/pandas
python
4241ba5e1eb5b12adaff4e98df9ddad65ff94ddb
groupby boxplot doesn't work if multiple by's are used #### Code Sample, a copy-pastable example if possible ```python data = pd.DataFrame({'A': [1, 1, 2, 2], 'B': ['a', 'b', 'a', 'b'], 'value': [1, 2, 3, 4]}) data.groupby(['A', 'B']).boxplot() ``` #### Problem description This code fails with an obscure error messag...
Thx for the report. Current impl doesn't care multilevel group cases. PR is appreciated. **Groupby boxplot is not working even when a single 'by' is used** This code is taken from [Pandas documentation for 1.0.5 version](https://pandas.pydata.org/pandas-docs/version/1.0.5/reference/api/pandas.plotting.boxplot.html) ...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 74a19472ec835..15e85d0f90c5e 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -409,7 +409,7 @@ Period Plotting ^^^^^^^^ -- +- Bug in :meth:`.DataFrameGroupBy.boxplot` failed when there were multipl...
diff --git a/pandas/tests/plotting/test_boxplot_method.py b/pandas/tests/plotting/test_boxplot_method.py index 2dd45a9abc7a5..f8029a1c1ee40 100644 --- a/pandas/tests/plotting/test_boxplot_method.py +++ b/pandas/tests/plotting/test_boxplot_method.py @@ -740,3 +740,17 @@ def test_boxplot_multiindex_column(self): ...
["pandas/tests/plotting/test_boxplot_method.py::TestDataFrameGroupByPlots::test_boxplot_multi_groupby_groups[group1]"]
["pandas/tests/plotting/test_boxplot_method.py::TestDataFramePlots::test_boxplot_group_no_xlabel_ylabel[True]", "pandas/tests/plotting/test_boxplot_method.py::TestDataFrameGroupByPlots::test_grouped_box_layout_axes_shape_cols_groupby[4-4]", "pandas/tests/plotting/test_boxplot_method.py::TestDataFrameGroupByPlots::test_...
null
true
2024-03-24T18:26:01Z
2
8
1
2,977
0
0.85
1
0.85
1
0.522833
91.4435
252
swe_gym::train::1378
swe_gym
train
1,378
pandas-dev__pandas-48691
pandas-dev/pandas
pandas-dev/pandas
python
070e1fe860495e408c049155d1928f8f7b970408
BUG: generated timestamps deviate from expected values ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug DOES NOT e...
Hi, thanks for your report. Could you run a git bisect to narrow it down further? Small note: ``I have confirmed this bug DOES NOT exist on the main branch of pandas`` references our ``main``branch, not a release version. But can confirm that it fails on main too. I am not sure that this is on our side. We are pa...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index 566e3d7c66b79..7237abf351866 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -115,9 +115,11 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor Other API changes ^^^...
diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py index 7b3647dc6cbef..58150fdce8503 100644 --- a/pandas/tests/scalar/timestamp/test_constructors.py +++ b/pandas/tests/scalar/timestamp/test_constructors.py @@ -677,3 +677,10 @@ def test_constructor_missi...
["pandas/tests/scalar/timestamp/test_constructors.py::test_timestamp_nano_range[-1]", "pandas/tests/scalar/timestamp/test_constructors.py::test_timestamp_nano_range[1000]"]
["pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructors::test_constructor_int_float_with_YM_unit[float]", "pandas/tests/scalar/timestamp/test_constructors.py::test_timestamp_constructor_identity", "pandas/tests/scalar/timestamp/test_constructors.py::TestTimestampConstructors::test_invalid_date_k...
null
true
2022-09-21T19:26:47Z
2
10
2
2,935
0
0.85
1
0.85
1
0.5225
91.4425
253
swe_gym::train::1622
swe_gym
train
1,622
pandas-dev__pandas-57800
pandas-dev/pandas
pandas-dev/pandas
python
dc19148bf7197a928a129b1d1679b1445a7ea7c7
BUG: groupby.apply when func always returns None returns empty dataframe ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed t...
Was this ever the case? Admittedly I've never done something like this so I just don't know. Been a user since 0.23, I can't think of a time I've used a function like this. Docs are unclear if its special cased or not. Agreed this should be added to the documentation in the `Notes` section of apply. This is to allow ce...
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index 16be9e0a4fc34..4e3be4f370113 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -284,6 +284,7 @@ Bug fixes - Fixed bug in :meth:`DataFrame.join` inconsistently setting result index name (:issue:`55815`) ...
diff --git a/pandas/tests/groupby/test_apply.py b/pandas/tests/groupby/test_apply.py index dcb73bdba2f9c..9bd2c22788fac 100644 --- a/pandas/tests/groupby/test_apply.py +++ b/pandas/tests/groupby/test_apply.py @@ -838,7 +838,8 @@ def test_func(x): msg = "DataFrameGroupBy.apply operated on the grouping columns" ...
["pandas/tests/groupby/test_apply.py::test_groupby_apply_all_none"]
["pandas/tests/groupby/test_apply.py::test_builtins_apply[sum-3]", "pandas/tests/groupby/test_apply.py::test_apply_index_has_complex_internals[index1]", "pandas/tests/groupby/test_apply.py::test_apply_fast_slow_identical", "pandas/tests/groupby/test_apply.py::test_group_apply_once_per_group[GH2656]", "pandas/tests/grou...
null
true
2024-03-10T20:37:55Z
3
16
1
2,814
0
0.85
1
0.85
1
0.522333
91.442
254
swe_gym::train::1550
swe_gym
train
1,550
pandas-dev__pandas-51355
pandas-dev/pandas
pandas-dev/pandas
python
9764f3dbf0173892aba5da4b122851ded43c09bc
BUG: iterparse on read_xml overwrites nested child elements ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exis...
there was quite same bug with attributes on this [issue](https://github.com/pandas-dev/pandas/issues/47343) I am not sure this is a bug. Per [read_xml](https://pandas.pydata.org/docs/dev/reference/api/pandas.read_xml.html) docs, the dictionary key in `iterparse` is intended to be the *repeating element* which serialize...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 778169b0dbeb4..b76655bc134b5 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1304,6 +1304,7 @@ I/O - Bug in :meth:`DataFrame.to_dict` not converting ``NA`` to ``None`` (:issue:`50795`) - Bug in :met...
diff --git a/pandas/tests/io/xml/test_xml.py b/pandas/tests/io/xml/test_xml.py index dfa251788ddc3..b73116519178e 100644 --- a/pandas/tests/io/xml/test_xml.py +++ b/pandas/tests/io/xml/test_xml.py @@ -948,6 +948,55 @@ def test_repeat_values_new_names(parser): tm.assert_frame_equal(df_iter, df_expected) +def te...
["pandas/tests/io/xml/test_xml.py::test_repeat_elements[etree]", "pandas/tests/io/xml/test_xml.py::test_repeat_elements[lxml]"]
["pandas/tests/io/xml/test_xml.py::test_wrong_dict_type[lxml]", "pandas/tests/io/xml/test_xml.py::test_file_elems_and_attrs[etree]", "pandas/tests/io/xml/test_xml.py::test_wrong_compression[lxml-gzip-tar]", "pandas/tests/io/xml/test_xml.py::test_bad_xml[lxml]", "pandas/tests/io/xml/test_xml.py::test_wrong_compression[l...
null
true
2023-02-13T01:12:08Z
2
10
2
2,931
0
0.85
1
0.85
1
0.521833
91.4405
255
swe_gym::train::1376
swe_gym
train
1,376
pandas-dev__pandas-50773
pandas-dev/pandas
pandas-dev/pandas
python
c426dc0d8a6952f7d4689eaa6a5294aceae66e1e
BUG: DatetimeIndex with non-nano values and freq='D' throws ValueError ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed thi...
diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index bb21bed2dc779..816d8abec1428 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -1897,7 +1897,12 @@ def _validate_frequency(cls, index, freq, **kwargs): try: on_fre...
diff --git a/pandas/tests/frame/methods/test_asfreq.py b/pandas/tests/frame/methods/test_asfreq.py index 5b3e1614e1ada..9fa9f27e7e312 100644 --- a/pandas/tests/frame/methods/test_asfreq.py +++ b/pandas/tests/frame/methods/test_asfreq.py @@ -17,6 +17,10 @@ class TestAsFreq: + @pytest.fixture(params=["s", "ms", "...
["pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_asfreq_after_normalize[s]", "pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_asfreq_after_normalize[us]", "pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_asfreq_after_normalize[ms]"]
["pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_asfreq_with_date_object_index[DataFrame]", "pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_tz_aware_asfreq_smoke[Series-US/Eastern]", "pandas/tests/frame/methods/test_asfreq.py::TestAsFreq::test_tz_aware_asfreq_smoke[DataFrame-US/Eastern]", "pan...
null
true
2023-01-16T10:55:14Z
1
7
3
5,081
0
0.85
1
0.92
1
0.523333
91.44
256
swe_gym::train::1608
swe_gym
train
1,608
pandas-dev__pandas-54074
pandas-dev/pandas
pandas-dev/pandas
python
b4929f8536fdfa9cd8abb181cdd16a522035f9e7
BUG: read_parquet raises ValueError on partitioned dataset when partition col is string[pyarrow] ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. ...
take
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 0f669beaa036f..255c707a04a94 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -533,13 +533,13 @@ Sparse ExtensionArray ^^^^^^^^^^^^^^ +- Bug in :class:`ArrowStringArray` constructor raises ``ValueEr...
diff --git a/pandas/tests/arrays/string_/test_string_arrow.py b/pandas/tests/arrays/string_/test_string_arrow.py index 45098e12ccb38..0f899f4c8e876 100644 --- a/pandas/tests/arrays/string_/test_string_arrow.py +++ b/pandas/tests/arrays/string_/test_string_arrow.py @@ -69,6 +69,33 @@ def test_constructor_not_string_type...
["pandas/tests/arrays/string_/test_string_arrow.py::test_constructor_valid_string_type_value_dictionary[False]", "pandas/tests/arrays/string_/test_string_arrow.py::test_constructor_valid_string_type_value_dictionary[True]"]
["pandas/tests/arrays/string_/test_string_arrow.py::test_setitem[key8-value8-expected8-True]", "pandas/tests/arrays/string_/test_string_arrow.py::test_setitem[key13-XX-expected13-False]", "pandas/tests/arrays/string_/test_string_arrow.py::test_eq_all_na", "pandas/tests/arrays/string_/test_string_arrow.py::test_setitem[...
null
true
2023-07-11T04:22:10Z
2
7
2
5,078
0
0.85
1
0.92
1
0.523333
91.44
257
swe_gym::train::1460
swe_gym
train
1,460
pandas-dev__pandas-52212
pandas-dev/pandas
pandas-dev/pandas
python
80b3feea900e97c8184761c8835cd79fd8bdd465
BUG: infer_dtype_from_scalar infers nanosecond dtype for second input ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this...
This may have unintended consequences here: https://github.com/pandas-dev/pandas/blob/1c17d94376523887d1113d001fa758d77b7d6eb2/pandas/core/indexes/interval.py#L545-L549 Test which hits these lines: `pytest pandas/tests/indexes/interval/test_interval.py::TestIntervalIndex::test_maybe_convert_i8`
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index e1ac9e3309de7..703322488d328 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -317,6 +317,7 @@ Datetimelike - Bug in :func:`date_range` when ``freq`` was a :class:`DateOffset` with ``nanoseconds`` (:is...
diff --git a/pandas/conftest.py b/pandas/conftest.py index 86f0121dd00a9..c24a56493b519 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -931,7 +931,7 @@ def rand_series_with_duplicate_datetimeindex() -> Series: (Period("2012-02-01", freq="D"), "period[D]"), ( Timestamp("2011-0...
["pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_fromValue", "pandas/tests/dtypes/cast/test_infer_dtype.py::test_infer_dtype_from_scalar[value4-expected4]", "pandas/tests/dtypes/cast/test_infer_dtype.py::test_infer_dtype_from_timedelta", "pandas/tests/groupby/test_timegrouper.py::TestGroupBy::te...
["pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_construction_to_datetimelike_unit[ns-m-float64]", "pandas/tests/groupby/transform/test_transform.py::test_null_group_str_reducer_series[True-max]", "pandas/tests/groupby/transform/test_transform.py::test_null_group_str_transformer_series[False-ffi...
null
true
2023-03-26T00:41:49Z
2
25
28
2,623
0
0.85
1
0.85
1
0.5205
91.4365
258
swe_gym::train::1507
swe_gym
train
1,507
pandas-dev__pandas-56321
pandas-dev/pandas
pandas-dev/pandas
python
98e1d2f8cec1593bb8bc6a8dbdd164372286ea09
BUG: Creating a string column on a mask results in NaN being stringyfied and potentially truncated based on the 'maxchar' value of the column ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pyda...
Seems to be a regression (haven't run a bisect yet). Was working as expected in 2.0.3 I've also come across this, running on Mac OS X. The change seems to occur from release 2.1.2 onwards (2.1.1 is ok). ### Expanded Example ``` import pandas as pd data = range(0,10) d = {'col1': data} df = pd.DataFrame(data=d)...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index 8c475791df64d..80d86805ded49 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -618,6 +618,7 @@ Indexing - Bug in :meth:`DataFrame.loc` when setting :class:`Series` with extension dtype into NumPy dtype...
diff --git a/pandas/tests/frame/indexing/test_indexing.py b/pandas/tests/frame/indexing/test_indexing.py index 4be5be77b015c..97e7ae15c6c63 100644 --- a/pandas/tests/frame/indexing/test_indexing.py +++ b/pandas/tests/frame/indexing/test_indexing.py @@ -1935,6 +1935,26 @@ def test_adding_new_conditional_column() -> None...
["pandas/tests/frame/indexing/test_indexing.py::test_adding_new_conditional_column_with_string[string[pyarrow_numpy]-True]", "pandas/tests/frame/indexing/test_indexing.py::test_adding_new_conditional_column_with_string[object-False]", "pandas/tests/frame/indexing/test_set_value.py::TestSetValue::test_set_value_resize"]
["pandas/tests/frame/indexing/test_indexing.py::TestSetitemValidation::test_setitem_validation_scalar_int[int8-indexer1-True0]", "pandas/tests/frame/indexing/test_indexing.py::TestDataFrameIndexing::test_setting_mismatched_na_into_nullable_fails[Int16-null2]", "pandas/tests/frame/indexing/test_indexing.py::TestSetitemV...
null
true
2023-12-04T15:15:15Z
2
10
3
2,921
0
0.85
1
0.85
1
0.520167
91.4355
259
swe_gym::train::1716
swe_gym
train
1,716
pandas-dev__pandas-51869
pandas-dev/pandas
pandas-dev/pandas
python
acf3395aaafbc15ce461f6667f0b1d63bf3766d1
BUG: 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when the colunm type is datetime in pandas to_sql command ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whats...
diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index d8b0b53331229..6084634503d97 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -2090,6 +2090,9 @@ def _dt_round( ): return self._round_temporally("round", freq, ambiguous, nonex...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 712fccae83cfe..6a3c49c826536 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2248,6 +2248,19 @@ def test_dt_ceil_year_floor(freq, method): tm.assert_series_equal(result, e...
["pandas/tests/extension/test_arrow.py::test_dt_to_pydatetime"]
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-03-09T19:36:11Z
2
6
1
4,876
0
0.85
1
0.92
1
0.52
91.43
260
swe_gym::train::1651
swe_gym
train
1,651
pandas-dev__pandas-48714
pandas-dev/pandas
pandas-dev/pandas
python
a375061d9518de447ef05b6490eeb264490a3952
BUG: `TypeError: Int64` when using `pd.pivot_table(..., margins=True)` with Int64 values ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I ...
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index 050dfacc13df0..3eea7081ae2de 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -239,6 +239,7 @@ Groupby/resample/rolling Reshaping ^^^^^^^^^ +- Bug in :meth:`DataFrame.pivot_table` raising ``TypeErro...
diff --git a/pandas/tests/reshape/test_pivot.py b/pandas/tests/reshape/test_pivot.py index 3fff9eb141e43..24212985b504b 100644 --- a/pandas/tests/reshape/test_pivot.py +++ b/pandas/tests/reshape/test_pivot.py @@ -2183,6 +2183,23 @@ def test_pivot_table_sort_false(self): ) tm.assert_frame_equal(result,...
["pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_table_nullable_margins"]
["pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_timegrouper", "pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily[86]", "pandas/tests/reshape/test_pivot.py::TestPivot::test_pivot_index_none", "pandas/tests/reshape/test_pivot.py::TestPivotTable::test_daily[106]", "pandas/tests/reshape/test_p...
null
true
2022-09-22T13:57:44Z
2
6
1
3,058
0
0.85
1
0.92
1
0.52
91.43
261
swe_gym::train::1382
swe_gym
train
1,382
pandas-dev__pandas-53652
pandas-dev/pandas
pandas-dev/pandas
python
d2d830d6366ea9569b830c5214dfcd16d61bd8a3
BUG: [pyarrow] AttributeError: 'Index' object has no attribute 'freq' ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this...
diff --git a/doc/source/whatsnew/v2.0.3.rst b/doc/source/whatsnew/v2.0.3.rst index 5590066d9513c..153df543d8c50 100644 --- a/doc/source/whatsnew/v2.0.3.rst +++ b/doc/source/whatsnew/v2.0.3.rst @@ -27,7 +27,7 @@ Bug fixes - Bug in :func:`read_csv` when defining ``dtype`` with ``bool[pyarrow]`` for the ``"c"`` and ``"py...
diff --git a/pandas/tests/indexing/test_datetime.py b/pandas/tests/indexing/test_datetime.py index 15e1fae77d65b..6510612ba6f87 100644 --- a/pandas/tests/indexing/test_datetime.py +++ b/pandas/tests/indexing/test_datetime.py @@ -168,3 +168,21 @@ def test_getitem_str_slice_millisecond_resolution(self, frame_or_series): ...
["pandas/tests/indexing/test_datetime.py::TestDatetimeIndex::test_getitem_pyarrow_index[DataFrame]", "pandas/tests/indexing/test_datetime.py::TestDatetimeIndex::test_getitem_pyarrow_index[Series]"]
["pandas/tests/indexing/test_datetime.py::TestDatetimeIndex::test_getitem_str_slice_millisecond_resolution[DataFrame]", "pandas/tests/indexing/test_datetime.py::TestDatetimeIndex::test_indexing_with_datetime_tz", "pandas/tests/indexing/test_datetime.py::TestDatetimeIndex::test_indexing_fast_xs", "pandas/tests/indexing/...
null
true
2023-06-13T18:58:11Z
2
6
2
3,039
0
0.85
1
0.92
1
0.52
91.43
262
swe_gym::train::1659
swe_gym
train
1,659
pandas-dev__pandas-53194
pandas-dev/pandas
pandas-dev/pandas
python
b033ca94e7ae6e1320c9d65a8163bd0a6049f40a
BUG: df.insert can't accept int64 value ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists on the [main branc...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 52fc8512c9db3..e659bf7adbf1a 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -351,6 +351,7 @@ Conversion - Bug in :meth:`ArrowDtype.numpy_dtype` returning nanosecond units for non-nanosecond ``pyarrow...
diff --git a/pandas/tests/frame/indexing/test_insert.py b/pandas/tests/frame/indexing/test_insert.py index 666a6ec3710a6..13e43abe0dd7f 100644 --- a/pandas/tests/frame/indexing/test_insert.py +++ b/pandas/tests/frame/indexing/test_insert.py @@ -110,3 +110,9 @@ def test_insert_frame(self): ) with pytes...
["pandas/tests/frame/indexing/test_insert.py::TestDataFrameInsert::test_insert_int64_loc"]
["pandas/tests/frame/indexing/test_insert.py::TestDataFrameInsert::test_insert_frame", "pandas/tests/frame/indexing/test_insert.py::TestDataFrameInsert::test_insert", "pandas/tests/frame/indexing/test_insert.py::TestDataFrameInsert::test_insert_column_bug_4032", "pandas/tests/frame/indexing/test_insert.py::TestDataFram...
null
true
2023-05-12T05:51:34Z
2
6
1
3,057
0
0.85
1
0.92
1
0.52
91.43
263
swe_bench_verified::test::444
swe_bench_verified
test
444
sympy__sympy-14531
sympy/sympy
sympy/sympy
python
205da797006360fc629110937e39a19c9561313e
StrPrinter setting are not respected by certain subexpressions For example, ``` >>> sstr(x + S(1)/2, sympy_integers=True) 'x + S(1)/2' >>> sstr(Eq(x, S(1)/2), sympy_integers=True) 'Eq(x, 1/2)' ``` The first output is correct, the second is not: the setting was ignored. Another example: ``` >>> sstr(Limit(x, x, S(1)/2)...
diff --git a/sympy/printing/str.py b/sympy/printing/str.py --- a/sympy/printing/str.py +++ b/sympy/printing/str.py @@ -86,7 +86,7 @@ def _print_Or(self, expr): return self.stringify(expr.args, " | ", PRECEDENCE["BitwiseOr"]) def _print_AppliedPredicate(self, expr): - return '%s(%s)' % (expr.func,...
diff --git a/sympy/printing/tests/test_python.py b/sympy/printing/tests/test_python.py --- a/sympy/printing/tests/test_python.py +++ b/sympy/printing/tests/test_python.py @@ -80,12 +80,14 @@ def test_python_keyword_function_name_escaping(): def test_python_relational(): - assert python(Eq(x, y)) == "e = Eq(x, y...
["test_python_relational", "test_Rational"]
["test_python_basic", "test_python_keyword_symbol_name_escaping", "test_python_keyword_function_name_escaping", "test_python_functions", "test_python_derivatives", "test_python_integrals", "test_python_matrix", "test_python_limits", "test_printmethod", "test_Abs", "test_Add", "test_Catalan", "test_ComplexInfinity", "te...
null
true
2018-03-18T18:15:33Z
1
38
2
640
0
1
1
0.85
1
0.233333
91.425
264
swe_gym::train::1788
swe_gym
train
1,788
pandas-dev__pandas-53977
pandas-dev/pandas
pandas-dev/pandas
python
4da9cb69f84641cbcad837cccfe7102233dd6463
BUG: df.replace(regex=True) causes highly fragmented DataFrame ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug ex...
Yeah, This looks wrong. `pandas.core.array_algos.replace.replace_regex` returns a result of the correct shape, so it's probably the block or frame constructor, i.e. could be an easy fix. A PR would be welcome. It's not straightforward unfortunately. There is a convert step that tries to infer a better dtype than obj...
diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index 1d572dbfd5386..8923faf444953 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -480,7 +480,15 @@ def convert( return [self.copy()] if copy else [self] if self.ndim != 1 and se...
diff --git a/pandas/tests/frame/methods/test_replace.py b/pandas/tests/frame/methods/test_replace.py index 9256df72cdf7b..1846ac24e9cc5 100644 --- a/pandas/tests/frame/methods/test_replace.py +++ b/pandas/tests/frame/methods/test_replace.py @@ -1592,3 +1592,10 @@ def test_replace_categorical_no_replacement(self): ...
["pandas/tests/frame/methods/test_replace.py::TestDataFrameReplaceRegex::test_replace_object_splitting"]
["pandas/tests/frame/methods/test_replace.py::TestDataFrameReplace::test_regex_replace_dict_nested_non_first_character[string[python]]", "pandas/tests/frame/methods/test_replace.py::TestDataFrameReplace::test_replace_list_with_mixed_type[Series-array-data2-to_replace2-value2-expected2]", "pandas/tests/frame/methods/tes...
null
true
2023-07-02T21:49:47Z
1
10
1
2,891
0
0.85
1
0.85
1
0.515167
91.4205
265
swe_gym::train::11
swe_gym
train
11
getmoto__moto-5752
getmoto/moto
getmoto/moto
python
b2300f1eae1323e3e8bc45f97e530ce129dff12e
describe_parameters depends on filter order, but shouldn't # Summary When calling `ssm` `describe_parameters`, you can pass in a list of filters. I have seen different behavior based on the order of my filters. With certain orders, the values returned do not match the filters. # MWE Let's create two parameters, then...
Here's the culprit: https://github.com/spulec/moto/blob/8f074b0799e4e5303f219549e177d52b016c2dfb/moto/ssm/models.py#L1612 That line returns True from the middle of the for loop. But that function is supposed to only return False from the for loop, and True at the end. A solution would be something like: ```...
diff --git a/moto/ssm/models.py b/moto/ssm/models.py --- a/moto/ssm/models.py +++ b/moto/ssm/models.py @@ -1606,22 +1606,26 @@ def _match_filters(self, parameter, filters=None): else: continue elif key.startswith("tag:"): - what = key[4:] or None - ...
diff --git a/tests/test_ssm/test_ssm_boto3.py b/tests/test_ssm/test_ssm_boto3.py --- a/tests/test_ssm/test_ssm_boto3.py +++ b/tests/test_ssm/test_ssm_boto3.py @@ -67,21 +67,14 @@ def test_delete_parameters(): def test_get_parameters_by_path(): client = boto3.client("ssm", region_name="us-east-1") - client.pu...
["tests/test_ssm/test_ssm_boto3.py::test_describe_parameters__multiple_tags"]
["tests/test_ssm/test_ssm_boto3.py::test_get_parameters_should_only_return_unique_requests", "tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_attributes", "tests/test_ssm/test_ssm_boto3.py::test_describe_parameters_invalid_parameter_filters[filters6-The", "tests/test_ssm/test_ssm_boto3.py::test_describe_para...
null
true
2022-12-10 20:23:01
1
26
1
2,568
0
0.85
1
0.85
1
0.514667
91.419
266
swe_gym::train::1532
swe_gym
train
1,532
pandas-dev__pandas-51817
pandas-dev/pandas
pandas-dev/pandas
python
88f2df5f65e8ff575ee7bdbf2bfa129893573f62
BUG: Inconsistency in `groupby` with multi-index ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the [m...
cc @rhshadrach Thoughts? We recently did this for the `by` argument, +1 on doing it for `level` too. Take Hi! New Pandas contributor here (apologies for potentially stupid questions): Does this issue only consider the indexes that are "generated" when iterating? For iter(), we create them in group_keys_seq@/core/gro...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 74319b0444659..ee6f8b81e3b5b 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -813,6 +813,7 @@ Deprecations - Deprecated :meth:`DataFrame.pad` in favor of :meth:`DataFrame.ffill` (:issue:`33396`) - De...
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index ea4bb42fb7ee1..2441be4528c99 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -2709,6 +2709,24 @@ def test_single_element_list_grouping(): assert result == expected +@py...
["pandas/tests/groupby/test_groupby.py::test_single_element_listlike_level_grouping_deprecation[level_arg2-True]", "pandas/tests/groupby/test_groupby.py::test_single_element_listlike_level_grouping_deprecation[level_arg0-False]", "pandas/tests/groupby/test_groupby.py::test_single_element_listlike_level_grouping_depreca...
["pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-min-apply-Float64-keys0-columns1]", "pandas/tests/groupby/test_groupby.py::test_dup_labels_output_shape[quantile-idx1]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-skew-agg-cat-keys1-columns1]", "pandas/tests/groupby/test_groupby.py::...
null
true
2023-03-07T11:16:12Z
2
16
4
2,757
0
0.85
1
0.85
1
0.512833
91.4135
267
swe_gym::train::1557
swe_gym
train
1,557
pandas-dev__pandas-57089
pandas-dev/pandas
pandas-dev/pandas
python
b5a963c872748801faa7ff67b8d766f7043bb1c1
BUG: df.str.match(pattern) fails with pd.options.future.infer_string = True with re.compile() ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [...
Thanks for the report; I'm seeing the implementation prior to #55976 work on https://github.com/pandas-dev/pandas/blob/d928a5cc222be5968b2f1f8a5f8d02977a8d6c2d/pandas/core/reshape/melt.py#L462 with `[col for col in df.columns if pattern.match(col)]` instead. cc @mroeschke
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 23da4a7f6ab25..5d60eae8f5ed0 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -15,6 +15,7 @@ Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed performance regression in :meth:`Series.combine_first` (:issue:...
diff --git a/pandas/tests/reshape/test_melt.py b/pandas/tests/reshape/test_melt.py index eeba7f441d75a..f224a45ca3279 100644 --- a/pandas/tests/reshape/test_melt.py +++ b/pandas/tests/reshape/test_melt.py @@ -1217,3 +1217,33 @@ def test_missing_stubname(self, dtype): new_level = expected.index.levels[0].astype...
["pandas/tests/reshape/test_melt.py::test_wide_to_long_pyarrow_string_columns"]
["pandas/tests/reshape/test_melt.py::TestMelt::test_pandas_dtypes[col0]", "pandas/tests/reshape/test_melt.py::TestWideToLong::test_mixed_type_suffix", "pandas/tests/reshape/test_melt.py::TestMelt::test_tuple_vars_fail_with_multiindex[id_vars0-value_vars0]", "pandas/tests/reshape/test_melt.py::TestMelt::test_melt_allows...
null
true
2024-01-26T18:37:00Z
3
8
1
2,914
0
0.85
1
0.85
1
0.512333
91.412
268
swe_bench_pro::test::621
swe_bench_pro
test
621
instance_qutebrowser__qutebrowser-deeb15d6f009b3ca0c3bd503a7cef07462bd16b4-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d
qutebrowser/qutebrowser
qutebrowser/qutebrowser
python
3ae5cc96aecb12008345f45bd7d06dbc52e48fa7
## Title Incorrect handling of numeric increment/decrement in URLs containing encoded characters and edge cases in `incdec_number` utility. ## Description The utility function responsible for incrementing or decrementing numeric values within different segments of a URL (`incdec_number` in `qutebrowser/utils/urlutils....
## Requirements - The `incdec_number` function must locate and modify the last numeric sequence present within the specified URL segments and apply the requested operation (`increment` or `decrement`) by the supplied `count`. - If the operation is `decrement` and the current value is less than `count`, the function mu...
diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index 59cf3134856..11cf1713c4a 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -535,13 +535,14 @@ def _get_incdec_value(match, incdec, url, count): # This should always succeed because we match \d+ val...
diff --git a/tests/unit/utils/test_urlutils.py b/tests/unit/utils/test_urlutils.py index e9758531a56..2c6478b326b 100644 --- a/tests/unit/utils/test_urlutils.py +++ b/tests/unit/utils/test_urlutils.py @@ -627,7 +627,15 @@ class TestIncDecNumber: 'http://example.com:80/v1/query_test?value={}', 'http://...
["tests/unit/utils/test_urlutils.py::TestIncDecNumber::test_incdec_number[http://localhost/%3A{}-{}foo-increment]", "tests/unit/utils/test_urlutils.py::TestIncDecNumber::test_incdec_number[http://localhost/%3A{}-{}foo-decrement]", "tests/unit/utils/test_urlutils.py::TestIncDecNumber::test_incdec_number[http://localhost...
["tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative_cwd", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_relative_os_error", "tests/unit/utils/test_urlutils.py::TestFuzzyUrl::test_file_absolute[/foo-expected0]", "tests...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_qutebrowser__qutebrowser-deeb15d6f009b3ca0c3bd503a7cef07462bd16b4-v363c8a7e5ccdf6968fc7ab84a2053ac78036691d
true
null
1
53
30
2,195
0
0.95
1
0.85
1
0.5425
91.4025
269
swe_gym::train::1682
swe_gym
train
1,682
pandas-dev__pandas-47222
pandas-dev/pandas
pandas-dev/pandas
python
4fe2f312ce83d84169aed76fbe7270891301c086
BUG: pd.apply returns a dataframe when empty dataframe instead of a series - [x] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the latest version of pandas. - [ ] (optional) I have confirmed this bug exists on the master branch of pandas. --- **Note**: Pleas...
pls check in 1.2.0 and master, I believe this is fixed I'm getting the same results in the pandas 1.2.0 <details> ```python >>> pandas.show_versions() INSTALLED VERSIONS ------------------ commit : 3e89b4c4b1580aa890023fc550774e63d499da25 python : 3.8.5.final.0 python-bits : 64 ...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 740a0f888d38f..c19352af406a8 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -852,6 +852,7 @@ Conversion - Bug in metaclass of generic abstract dtypes causing :meth:`DataFrame.apply` and :meth:`Series...
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index ef7ab4a469865..72a9d8723d34c 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -1577,3 +1577,11 @@ def test_apply_type(): result = df.apply(type, axis=1) expecte...
["pandas/tests/apply/test_frame_apply.py::test_apply_on_empty_dataframe"]
["pandas/tests/apply/test_frame_apply.py::test_result_type_series_result_other_index", "pandas/tests/apply/test_frame_apply.py::test_applymap_empty[<lambda>-expected0]", "pandas/tests/apply/test_frame_apply.py::test_size_as_str[axis=0-agg]", "pandas/tests/apply/test_frame_apply.py::test_agg_axis1_duplicate_index[data2-...
null
true
2022-06-04T10:02:57Z
2
6
1
2,914
0
0.85
1
0.85
1
0.505667
91.392
270
swe_bench_verified::test::89
swe_bench_verified
test
89
django__django-12774
django/django
django/django
python
67f9d076cfc1858b94f9ed6d1a5ce2327dcc8d0d
Allow QuerySet.in_bulk() for fields with total UniqueConstraints. Description If a field is unique by UniqueConstraint instead of unique=True running in_bulk() on that field will fail. Consider: class Article(models.Model): slug = models.CharField(max_length=255) class Meta: constraints = [ models.UniqueConstr...
diff --git a/django/db/models/query.py b/django/db/models/query.py --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -689,7 +689,17 @@ def in_bulk(self, id_list=None, *, field_name='pk'): """ assert not self.query.is_sliced, \ "Cannot use 'limit' or 'offset' with in_bulk"...
diff --git a/tests/lookup/models.py b/tests/lookup/models.py --- a/tests/lookup/models.py +++ b/tests/lookup/models.py @@ -67,6 +67,11 @@ class Season(models.Model): gt = models.IntegerField(null=True, blank=True) nulled_text_field = NulledTextField(null=True) + class Meta: + constraints = [ + ...
["test_in_bulk_meta_constraint (lookup.tests.LookupTests)"]
["test_chain_date_time_lookups (lookup.tests.LookupTests)", "test_count (lookup.tests.LookupTests)", "test_custom_field_none_rhs (lookup.tests.LookupTests)", "Lookup.can_use_none_as_rhs=True allows None as a lookup value.", "test_error_messages (lookup.tests.LookupTests)", "test_escaping (lookup.tests.LookupTests)", "t...
null
true
2020-04-22T11:02:30Z
1
12
1
1,091
0
1
1
0.85
1
0.221833
91.3905
271
swe_gym::train::1237
swe_gym
train
1,237
pandas-dev__pandas-51057
pandas-dev/pandas
pandas-dev/pandas
python
852518eb293897d14c7a89afe4f14dbe0e30c160
BUG: `replace` is changing the order of ordered categories ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists o...
Thanks for the report. I can confirm this exists on main and was introduced in #50857. I'll submit a fix.
diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 5b61695410474..6c497b3a7b6d8 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -2284,7 +2284,16 @@ def _replace(self, *, to_replace, value, inplace: bool = False): ser = ser.replace(...
diff --git a/pandas/tests/arrays/categorical/test_replace.py b/pandas/tests/arrays/categorical/test_replace.py index c25f1d9c9feac..ee9e1dbc81e12 100644 --- a/pandas/tests/arrays/categorical/test_replace.py +++ b/pandas/tests/arrays/categorical/test_replace.py @@ -78,3 +78,13 @@ def test_replace_categorical_ea_dtype():...
["pandas/tests/arrays/categorical/test_replace.py::test_replace_maintain_ordering"]
["pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[to_replace10-value10-expected10-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series[to_replace7-5-expected7-False]", "pandas/tests/arrays/categorical/test_replace.py::test_replace_categorical_series...
null
true
2023-01-29T21:08:44Z
1
11
1
2,804
0
0.85
1
0.85
1
0.504
91.387
272
swe_gym::train::1833
swe_gym
train
1,833
pandas-dev__pandas-47387
pandas-dev/pandas
pandas-dev/pandas
python
5e3d0ed0ce02e61af6b0266f88cbb78a6278363c
TST,WARN: read_csv raises warning at wrong stacklevel, but _assert_raised_with_correct_stacklevel doesn't fail ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html...
OK, the issue is that what's getting called is `Parser.read_csv`, which indeed is in `conftest.py` Ah maybe it's enough to just use read_csv_check_warnings, I'll give that a go
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index b462f0c6a8ffe..ef9537200bccd 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -23,7 +23,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- The :class:`errors.FutureWarning` raised when passing argumen...
diff --git a/pandas/tests/io/parser/common/test_common_basic.py b/pandas/tests/io/parser/common/test_common_basic.py index 115a2976ce618..7f60fd60c91b0 100644 --- a/pandas/tests/io/parser/common/test_common_basic.py +++ b/pandas/tests/io/parser/common/test_common_basic.py @@ -806,8 +806,7 @@ def test_read_csv_posargs_d...
["pandas/tests/io/parser/common/test_common_basic.py::test_read_csv_posargs_deprecation[c_high]", "pandas/tests/io/parser/common/test_common_basic.py::test_read_csv_posargs_deprecation[c_low]", "pandas/tests/io/parser/common/test_common_basic.py::test_read_csv_posargs_deprecation[pyarrow]", "pandas/tests/io/parser/comm...
["pandas/tests/io/parser/common/test_common_basic.py::test_read_csv_dataframe[c_high]", "pandas/tests/io/parser/common/test_common_basic.py::test_empty_lines[c_high-,-False-exp_data2]", "pandas/tests/io/parser/common/test_common_basic.py::test_read_empty_with_usecols[c_low--kwargs0-None]", "pandas/tests/io/parser/commo...
null
true
2022-06-16T12:42:56Z
2
6
4
2,850
0
0.85
1
0.85
1
0.495
91.36
273
swe_gym::train::1447
swe_gym
train
1,447
pandas-dev__pandas-54027
pandas-dev/pandas
pandas-dev/pandas
python
b4929f8536fdfa9cd8abb181cdd16a522035f9e7
BUG: Categorical order lost after call to `remove_categories` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exi...
Thanks! This looks odd, investigations welcome I have found the root of this issue and will submit a PR later this evening.
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index e154ca2cd3884..0c71c82788c9f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -375,6 +375,7 @@ Bug fixes Categorical ^^^^^^^^^^^ +- Bug in :meth:`CategoricalIndex.remove_categories` where ordered ca...
diff --git a/pandas/tests/indexes/categorical/test_category.py b/pandas/tests/indexes/categorical/test_category.py index 232d966e39a01..873d06db58fab 100644 --- a/pandas/tests/indexes/categorical/test_category.py +++ b/pandas/tests/indexes/categorical/test_category.py @@ -373,3 +373,18 @@ def test_method_delegation(sel...
["pandas/tests/indexes/categorical/test_category.py::TestCategoricalIndex2::test_remove_maintains_order"]
["pandas/tests/indexes/categorical/test_category.py::TestCategoricalIndex::test_unique[True-data3-categories3-expected_data3]", "pandas/tests/indexes/categorical/test_category.py::TestCategoricalIndex::test_drop_duplicates[data0-categories0-expected0]", "pandas/tests/indexes/categorical/test_category.py::TestCategorica...
null
true
2023-07-06T21:55:41Z
2
7
1
2,819
0
0.85
1
0.85
1
0.493167
91.3545
274
swe_gym::train::1253
swe_gym
train
1,253
pandas-dev__pandas-49080
pandas-dev/pandas
pandas-dev/pandas
python
0106c26529900bad0561efb9c9180f7f016365b0
BUG: freq information lost after stack() is called ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the ...
Hi @MMCMA I think it is only happening when I do `df2=df.stack()` and look at `df2.index` . pls try yourself once. ```Python console In [64]: idx = pd.date_range('20200101', periods=12, freq='BM') In [65]: df = pd.DataFrame(dict(a=range(12)), index=idx) In [66]: df.index Out[66]: DatetimeIndex(['2020-...
diff --git a/doc/source/whatsnew/v1.5.1.rst b/doc/source/whatsnew/v1.5.1.rst index 2fca23024cba7..4518c6f544e48 100644 --- a/doc/source/whatsnew/v1.5.1.rst +++ b/doc/source/whatsnew/v1.5.1.rst @@ -76,6 +76,7 @@ Fixed regressions - Fixed regression in :meth:`DataFrame.loc` raising ``FutureWarning`` when setting an empt...
diff --git a/pandas/tests/indexes/multi/test_get_level_values.py b/pandas/tests/indexes/multi/test_get_level_values.py index 300df00d6151c..bab6481fe107f 100644 --- a/pandas/tests/indexes/multi/test_get_level_values.py +++ b/pandas/tests/indexes/multi/test_get_level_values.py @@ -112,3 +112,14 @@ def test_get_level_val...
["pandas/tests/indexes/multi/test_get_level_values.py::test_values_loses_freq_of_underlying_index"]
["pandas/tests/indexes/multi/test_get_level_values.py::test_get_level_values", "pandas/tests/indexes/multi/test_get_level_values.py::TestGetLevelValues::test_get_level_values_box_datetime64", "pandas/tests/indexes/multi/test_get_level_values.py::test_get_level_values_na", "pandas/tests/indexes/multi/test_get_level_valu...
null
true
2022-10-14T08:54:18Z
2
11
1
2,732
0
0.85
1
0.85
1
0.492
91.351
275
swe_bench_pro::test::109
swe_bench_pro
test
109
instance_ansible__ansible-e22e103cdf8edc56ff7d9b848a58f94f1471a263-v1055803c3a812189a1133297f7f5468579283f86
ansible/ansible
ansible/ansible
python
a77dbf08663e002198d0fa2af502d5cde8009454
# Setting WinRM Kinit Command Fails in Versions Newer than 2.5 ## Summary When using the `ansible_winrm_kinit_cmd` variable to specify a custom kinit command for Kerberos authentication via WinRM, the first playbook task that requires Kerberos authentication fails. The error is reported as a permission error or \"fil...
## Requirements - The WinRM connection plugin must support a new configuration key kinit_args, exposed as the inventory variable ansible_winrm_kinit_args. - The option kinit_args should accept a string containing one or more arguments that are passed to the kinit command when acquiring a Kerberos ticket. - When bui...
diff --git a/changelogs/fragments/winrm_kinit_args.yaml b/changelogs/fragments/winrm_kinit_args.yaml new file mode 100644 index 00000000000000..78ffa7c97fd6da --- /dev/null +++ b/changelogs/fragments/winrm_kinit_args.yaml @@ -0,0 +1,2 @@ +minor_changes: +- winrm - Added ``ansible_winrm_kinit_args`` that can be used to ...
diff --git a/test/units/plugins/connection/test_winrm.py b/test/units/plugins/connection/test_winrm.py index 67bfd9ae460c6d..e6bf9ad2919a2f 100644 --- a/test/units/plugins/connection/test_winrm.py +++ b/test/units/plugins/connection/test_winrm.py @@ -229,6 +229,10 @@ class TestWinRMKerbAuth(object): (["kinit2...
["test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_success_subprocess[options3-expected3]", "test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_success_subprocess[options4-expected4]", "test/units/plugins/connection/test_winrm.py::TestWinRMKerbAuth::test_kinit_success_p...
["test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_options[options6-direct6-expected6-True]", "test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_options[options11-direct11-expected11-False]", "test/units/plugins/connection/test_winrm.py::TestConnectionWinRM::test_set_o...
ghcr.io/scaleapi/swe-bench_pro-v2:instance_ansible__ansible-e22e103cdf8edc56ff7d9b848a58f94f1471a263-v1055803c3a812189a1133297f7f5468579283f86
true
null
2
30
4
2,550
0
0.95
1
0.85
1
0.525
91.35
276
swe_gym::train::1189
swe_gym
train
1,189
pandas-dev__pandas-49453
pandas-dev/pandas
pandas-dev/pandas
python
e8b037e451b97bd7bd4b11a17c2d2d8d905ffbff
BUG: can't pass `Colormap` instance when plotting if using matplotlib >= 3.6 ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirm...
Thanks for reporting and investigating this @zmoon! A pr would be welcome to fix this. Ok!
diff --git a/doc/source/whatsnew/v1.5.2.rst b/doc/source/whatsnew/v1.5.2.rst index ff617e8bc5eef..e65be3bcecd76 100644 --- a/doc/source/whatsnew/v1.5.2.rst +++ b/doc/source/whatsnew/v1.5.2.rst @@ -14,6 +14,8 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in :meth:`Serie...
diff --git a/pandas/tests/io/formats/style/test_matplotlib.py b/pandas/tests/io/formats/style/test_matplotlib.py index 8d9f075d8674d..52fd5355e3302 100644 --- a/pandas/tests/io/formats/style/test_matplotlib.py +++ b/pandas/tests/io/formats/style/test_matplotlib.py @@ -284,3 +284,17 @@ def test_bar_color_raises(df): ...
["pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[scatter]", "pandas/tests/io/formats/style/test_matplotlib.py::test_pass_colormap_instance[hexbin]"]
["pandas/tests/io/formats/style/test_matplotlib.py::test_background_gradient_color[text_gradient]", "pandas/tests/io/formats/style/test_matplotlib.py::test_background_gradient_gmap_dataframe_align[subset3-exp_gmap3-gmap4]", "pandas/tests/io/formats/style/test_matplotlib.py::test_background_gradient_axis[background_grad...
null
true
2022-11-01T20:59:07Z
3
16
2
2,618
0
0.85
1
0.85
1
0.489667
91.344
277
swe_gym::train::1762
swe_gym
train
1,762
pandas-dev__pandas-50672
pandas-dev/pandas
pandas-dev/pandas
python
9d8e7048affb31aa33bfe6f09b626b3045ee0d33
BUG: `is_integer_dtype` returns `False` for integer `ArrowDtype`s ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug...
cc @mroeschke @phofl for visibility
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 3ac004ef335ac..530d5dd00d1b2 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1049,6 +1049,7 @@ ExtensionArray - Bug when concatenating an empty DataFrame with an ExtensionDtype to another DataFrame w...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index c02fa0aecdacc..78c49ae066288 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -39,7 +39,11 @@ import pandas._testing as tm from pandas.api.types import ( is_bool_dtype, + ...
["pandas/tests/extension/test_arrow.py::test_is_unsigned_integer_dtype[uint32]", "pandas/tests/extension/test_arrow.py::test_is_unsigned_integer_dtype[uint8]", "pandas/tests/extension/test_arrow.py::test_is_signed_integer_dtype[int16]", "pandas/tests/extension/test_arrow.py::test_is_integer_dtype[uint16]", "pandas/test...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInterface::test_memory_usage[binary]", "pandas/tests/extension/test_arrow.py::TestBaseReshapin...
null
true
2023-01-10T23:59:21Z
2
19
18
2,557
0
0.85
1
0.85
1
0.4895
91.3435
278
swe_gym::train::394
swe_gym
train
394
python__mypy-10937
python/mypy
python/mypy
python
58c0a051b72731f093385cc7001b1f5c2abd2c18
Cache causes mypy to fail every 2nd run for module importing from aws_cdk **Bug Report** When `mypy` is run multiple times on a Python module containing `from aws_cdk import core` it will fail every 2nd time due to the error "Skipping analyzing 'aws_cdk': found module but no type hints or library stubs". Disabling th...
Huh, that's an interesting one. I can repro, including with master. But weirdly, not with my editable install of mypy. Here's a side by side of `mypy -v` from a successful and a failing run: <details> ``` LOG: Mypy Version: 0.800+dev.dc251783ccb9baa48fc62d109a88854ac514816d LOG: Mypy Version: ...
diff --git a/mypy/build.py b/mypy/build.py --- a/mypy/build.py +++ b/mypy/build.py @@ -751,7 +751,6 @@ def correct_rel_imp(imp: Union[ImportFrom, ImportAll]) -> str: res.append((ancestor_pri, ".".join(ancestors), imp.line)) elif isinstance(imp, ImportFrom): ...
diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test --- a/test-data/unit/check-incremental.test +++ b/test-data/unit/check-incremental.test @@ -5563,3 +5563,25 @@ class D: [out2] tmp/a.py:2: note: Revealed type is "builtins.list[builtins.int]" tmp/a.py:3: note: Revealed type is...
["mypy/test/testcheck.py::TypeCheckSuite::testIncrementalNamespacePackage2", "mypy/test/testcheck.py::TypeCheckSuite::testIncrementalNamespacePackage1"]
[]
null
true
2021-08-06T00:58:05Z
1
23
2
2,474
0
0.85
1
0.85
1
0.489
91.342
279
swe_gym::train::1547
swe_gym
train
1,547
pandas-dev__pandas-50170
pandas-dev/pandas
pandas-dev/pandas
python
70eef55e438823697515e834ee4ac350bdb0aaa7
BUG: `Series` slicing can fail for extension array `Index` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists...
I should also note that it seems important that the reproducer in slicing at the end of the series. Things work if one slices in the beginning or middle of the series ```python In [6]: s = pd.Series(range(5), index=pd.Index(range(5), dtype="int64[pyarrow]")) In [7]: s[2:3] Out[7]: 2 2 dtype: int64 In [8...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index cbad169fe4d56..d3710b69dd4c1 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -833,6 +833,7 @@ Indexing ^^^^^^^^ - Bug in :meth:`DataFrame.reindex` filling with wrong values when indexing columns and ...
diff --git a/pandas/tests/series/indexing/test_indexing.py b/pandas/tests/series/indexing/test_indexing.py index 4efc14be3eb7e..387272eb807e8 100644 --- a/pandas/tests/series/indexing/test_indexing.py +++ b/pandas/tests/series/indexing/test_indexing.py @@ -10,6 +10,7 @@ from pandas import ( NA, DataFrame, + ...
["pandas/tests/series/indexing/test_indexing.py::test_loc_ea_numeric_index_oob_slice_end"]
["pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_disallowed_multiindex[key0]", "pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_disallowed_multiindex[key2]", "pandas/tests/series/indexing/test_indexing.py::TestDeprecatedI...
null
true
2022-12-10T20:47:19Z
2
6
1
2,783
0
0.85
1
0.85
1
0.483833
91.3265
280
swe_gym::train::1277
swe_gym
train
1,277
pandas-dev__pandas-54129
pandas-dev/pandas
pandas-dev/pandas
python
e0964c2da4486896302e933044c6059d523c681f
BUG: DataFrame.groupby.count with arrow dtypes do not return arrow dtypes ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed ...
Another weird example: ``` >>> pd.DataFrame({"A": pd.Series([True, False, True, False], dtype="bool[pyarrow]"), "B": pd.Series([17, 23, 106, 129], dtype="int64[pyarrow]")}).groupby("A").var().dtypes B float64 dtype: object >>> pd.DataFrame({"A": pd.Series([True, False, True, False], dtype="bool[pyarrow]"), "B...
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 839870cb18a0b..107dd87fd7486 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -569,6 +569,7 @@ Groupby/resample/rolling - Bug in :meth:`GroupBy.var` failing to raise ``TypeError`` when called with date...
diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index b6fa4fbcaa92c..197cdc3f436a1 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -3154,6 +3154,18 @@ def test_to_numpy_temporal(pa_type): tm.assert_numpy_array_equal(result, ex...
["pandas/tests/extension/test_arrow.py::test_groupby_count_return_arrow_dtype[uint16]", "pandas/tests/extension/test_arrow.py::test_groupby_count_return_arrow_dtype[double]", "pandas/tests/extension/test_arrow.py::test_groupby_count_return_arrow_dtype[timestamp[ns,", "pandas/tests/extension/test_arrow.py::test_groupby_...
["pandas/tests/extension/test_arrow.py::TestBaseSetitem::test_setitem_scalar[timestamp[s,", "pandas/tests/extension/test_arrow.py::TestConstructors::test_from_dtype[timestamp[us,", "pandas/tests/extension/test_arrow.py::TestBaseMethods::test_shift_0_periods[binary]", "pandas/tests/extension/test_arrow.py::TestBaseInter...
null
true
2023-07-14T20:14:18Z
2
8
35
2,726
0
0.85
1
0.85
1
0.481
91.318
281
swe_gym::train::1239
swe_gym
train
1,239
pandas-dev__pandas-49284
pandas-dev/pandas
pandas-dev/pandas
python
8f869f3de0048d01fcf2f8198644fca72b926aa9
BUG: inner join with StringDtype multi-indexes gives unexpected result in 1.5.x ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have conf...
I couldn't really figure out which PR broke this, but maybe @jbrockmendel you know this? I've seen some merged PRs from you in 1.5.x that might be related to this. ``` commit 4248b23371a70b339a2c16b8e5caca9c2e5897f8 Author: jbrockmendel <jbrockmendel@gmail.com> Date: Tue Jan 25 09:31:24 2022 -0800 ENH: Exte...
diff --git a/doc/source/whatsnew/v1.5.2.rst b/doc/source/whatsnew/v1.5.2.rst index e65be3bcecd76..572d6c74e767f 100644 --- a/doc/source/whatsnew/v1.5.2.rst +++ b/doc/source/whatsnew/v1.5.2.rst @@ -13,6 +13,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ +- Fixed regression in :meth:`Mul...
diff --git a/pandas/tests/indexes/multi/test_join.py b/pandas/tests/indexes/multi/test_join.py index 23d5325dde2bb..aa2f2ca5af7bd 100644 --- a/pandas/tests/indexes/multi/test_join.py +++ b/pandas/tests/indexes/multi/test_join.py @@ -6,6 +6,8 @@ Index, Interval, MultiIndex, + Series, + StringDtype, ...
["pandas/tests/indexes/multi/test_join.py::test_join_midx_ea", "pandas/tests/indexes/multi/test_join.py::test_join_midx_string"]
["pandas/tests/indexes/multi/test_join.py::test_join_self[inner]", "pandas/tests/indexes/multi/test_join.py::test_join_level_corner_case", "pandas/tests/indexes/multi/test_join.py::test_join_level[outer-other1]", "pandas/tests/indexes/multi/test_join.py::test_join_level[right-other0]", "pandas/tests/indexes/multi/test_...
null
true
2022-10-24T20:27:06Z
2
7
2
2,740
0
0.85
1
0.85
1
0.48
91.315
282
swe_gym::train::1374
swe_gym
train
1,374
pandas-dev__pandas-57157
pandas-dev/pandas
pandas-dev/pandas
python
9b95e4596c5d47b5dcc3cbedf143023475930595
BUG: Regression from 2.1 -> 2.2: df.to_dict produces int instead of timestamp ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confir...
Thanks for the report. Result from a git bisect: ``` commit 18315c5830459535ea8471e66e82fafa4c538e08 Author: taytzehao Date: Sat Sep 2 00:55:05 2023 +0800 #50990 Increase to_dict('list') performance (#54824) ``` cc @taytzehao
diff --git a/doc/source/whatsnew/v2.2.1.rst b/doc/source/whatsnew/v2.2.1.rst index 1302648c3fc9a..19b7e3493f964 100644 --- a/doc/source/whatsnew/v2.2.1.rst +++ b/doc/source/whatsnew/v2.2.1.rst @@ -18,6 +18,7 @@ Fixed regressions - Fixed regression in :func:`merge_ordered` raising ``TypeError`` for ``fill_method="ffill...
diff --git a/pandas/tests/frame/methods/test_to_dict.py b/pandas/tests/frame/methods/test_to_dict.py index 61f0ad30b4519..570f85a4a31ee 100644 --- a/pandas/tests/frame/methods/test_to_dict.py +++ b/pandas/tests/frame/methods/test_to_dict.py @@ -12,8 +12,11 @@ NA, DataFrame, Index, + Interval, Mul...
["pandas/tests/frame/methods/test_to_dict.py::test_to_dict_list_pd_scalars[val0]", "pandas/tests/frame/methods/test_to_dict.py::test_to_dict_list_pd_scalars[val1]"]
["pandas/tests/frame/methods/test_to_dict.py::TestDataFrameToDict::test_to_dict_orient_tight[columns3-None]", "pandas/tests/frame/methods/test_to_dict.py::TestDataFrameToDict::test_to_dict[mapping1]", "pandas/tests/frame/methods/test_to_dict.py::TestDataFrameToDict::test_to_dict_index_false_error[index]", "pandas/tests...
null
true
2024-01-30T21:49:48Z
2
9
2
2,691
0
0.85
1
0.85
1
0.4785
91.3105
283
swe_bench_verified::test::492
swe_bench_verified
test
492
sympy__sympy-23824
sympy/sympy
sympy/sympy
python
39de9a2698ad4bb90681c0fdb70b30a78233145f
physics.hep.kahane_simplify() incorrectly reverses order of leading uncontracted gamma matrices The kahane_simplify() function applies [identities](https://en.wikipedia.org/w/index.php?title=Gamma_matrices&oldid=1098219980#Miscellaneous_identities) such as $\gamma^\mu \gamma_\mu = 4 I_4$ to simplify products of gamma m...
diff --git a/sympy/physics/hep/gamma_matrices.py b/sympy/physics/hep/gamma_matrices.py --- a/sympy/physics/hep/gamma_matrices.py +++ b/sympy/physics/hep/gamma_matrices.py @@ -694,8 +694,7 @@ def kahane_simplify(expression): # If `first_dum_pos` is not zero, it means that there are trailing free gamma # matr...
diff --git a/sympy/physics/hep/tests/test_gamma_matrices.py b/sympy/physics/hep/tests/test_gamma_matrices.py --- a/sympy/physics/hep/tests/test_gamma_matrices.py +++ b/sympy/physics/hep/tests/test_gamma_matrices.py @@ -257,10 +257,12 @@ def test_kahane_simplify1(): t = (G(mu)*G(nu)*G(rho)*G(sigma)*G(-mu)) r =...
["test_kahane_simplify1"]
["test_kahane_algorithm", "test_gamma_matrix_class"]
null
true
2022-07-23T22:13:36Z
1
3
1
2,054
0
1
1
1
0.8
0.352333
91.307
284
swe_gym::train::1632
swe_gym
train
1,632
pandas-dev__pandas-47771
pandas-dev/pandas
pandas-dev/pandas
python
6d458eefdf9ae17dceff39471853e4af136ab495
BUG: pd.cut regression since version 1.4.0 when operating on datetime ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this...
Thanks for the report! Confirmed on main. first bad commit: [0283df65e57df0601972fa7aa3c8a1b130afbe74] REF: implement Index._should_partial_index (#42227) cc @jbrockmendel @simonjayhawkins you never ping me on my _good_ commits The _bad_ is copy and pasted from the git bisect output and is the default label. All yo...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 96e4ad4321c60..0393879a766a5 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -16,6 +16,7 @@ Fixed regressions ~~~~~~~~~~~~~~~~~ - Fixed regression in taking NULL :class:`objects` from a :class:`DataF...
diff --git a/pandas/tests/indexes/interval/test_indexing.py b/pandas/tests/indexes/interval/test_indexing.py index 9b4afcc9c00b8..4653981a1285d 100644 --- a/pandas/tests/indexes/interval/test_indexing.py +++ b/pandas/tests/indexes/interval/test_indexing.py @@ -8,6 +8,7 @@ from pandas import ( NA, Categorical...
["pandas/tests/indexes/interval/test_indexing.py::TestGetIndexer::test_get_indexer_datetime", "pandas/tests/reshape/test_cut.py::test_cut_bins_datetime_intervalindex"]
["pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[left-1]", "pandas/tests/reshape/test_cut.py::test_cut_pass_labels_compat", "pandas/tests/indexes/interval/test_indexing.py::TestGetLoc::test_get_loc_scalar[neither-3.5]", "pandas/tests/reshape/test_cut.py::test_single_bin[1--9.0]", "panda...
null
true
2022-07-17T19:52:47Z
2
9
2
2,682
0
0.85
1
0.85
1
0.477
91.306
285
swe_gym::train::1719
swe_gym
train
1,719
pandas-dev__pandas-54997
pandas-dev/pandas
pandas-dev/pandas
python
8664572fe63dbcb865588d9d564b49a572c3351e
BUG: is_string_dtype(pd.Index([], dtype='O')) returns `False` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exist...
Referring to: https://github.com/pandas-dev/pandas/blob/61e54c2025ad8cbd63ad0919fb7447b25592d538/pandas/core/dtypes/common.py#L137 is_object_dtype(np.array([], dtype=object)) True The Object dtype can be a mix of other dtypes. It's not exclusive to strings. "All strings are objects but not all objects are s...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index fa3cef6d9457d..2198a3107d297 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -253,6 +253,7 @@ Bug fixes ~~~~~~~~~ - Bug in :class:`AbstractHolidayCalendar` where timezone data was not propagated when...
diff --git a/pandas/tests/dtypes/test_common.py b/pandas/tests/dtypes/test_common.py index 4507857418e9e..6f6cc5a5ad5d8 100644 --- a/pandas/tests/dtypes/test_common.py +++ b/pandas/tests/dtypes/test_common.py @@ -301,14 +301,23 @@ def test_is_categorical_dtype(): assert com.is_categorical_dtype(pd.CategoricalI...
["pandas/tests/dtypes/test_common.py::test_is_string_dtype[dtype6-True]"]
["pandas/tests/dtypes/test_common.py::test_is_not_int64_dtype[float]", "pandas/tests/dtypes/test_common.py::test_dtype_equal[float-float64-datetime-datetime64[ns]]", "pandas/tests/dtypes/test_common.py::test_is_integer_dtype[uint64_0]", "pandas/tests/dtypes/test_common.py::test__is_dtype_type[input_param13-CategoricalD...
null
true
2023-09-04T11:23:34Z
2
10
1
2,661
0
0.85
1
0.85
1
0.476833
91.3055
286
swe_gym::train::1247
swe_gym
train
1,247
pandas-dev__pandas-54306
pandas-dev/pandas
pandas-dev/pandas
python
aefede93b1c2b0a2e311220bfdd8c1af97a92441
BUG: groupby() attempts to converts name of Series if name is a month and index is DateTime ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X]...
I just noticed the above has version 1.4.3, I double checked the same results happens with 1.4.4 Hi, I ran into this bug too and did some investigations. The error is `pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00`. The problem comes from the line below....
diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 0fdec3175f635..aa66a10a163ac 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -628,6 +628,7 @@ Groupby/resample/rolling - Bug in :meth:`GroupBy.var` failing to raise ``TypeError`` when called with date...
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index c8de1cd6785b6..5d8f1c7ac6787 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -3124,3 +3124,12 @@ def test_groupby_with_Time_Grouper(): df = test_data.groupby(Grouper(key="t...
["pandas/tests/groupby/test_groupby.py::test_groupby_series_with_datetimeindex_month_name"]
["pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-min-apply-Float64-keys0-columns1]", "pandas/tests/groupby/test_groupby.py::test_dup_labels_output_shape[quantile-idx1]", "pandas/tests/groupby/test_groupby.py::test_empty_groupby[False-skew-agg-cat-keys1-columns1]", "pandas/tests/groupby/test_groupby.py::...
null
true
2023-07-29T14:13:52Z
2
8
1
2,691
0
0.85
1
0.85
1
0.475167
91.3005
287
swe_gym::train::1589
swe_gym
train
1,589
pandas-dev__pandas-50606
pandas-dev/pandas
pandas-dev/pandas
python
07822fa3788470d2fe23af301d0db8fbd74fc03e
BUG: `to_numpy` is now failing given incompatible `na_value` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [ ] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists...
cc @phofl Thx, will take a look
diff --git a/pandas/core/base.py b/pandas/core/base.py index 23121b7075fe1..f6fd8195a8ff5 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -38,6 +38,7 @@ doc, ) +from pandas.core.dtypes.cast import can_hold_element from pandas.core.dtypes.common import ( is_categorical_dtype, is_dict_lik...
diff --git a/pandas/tests/series/methods/test_to_numpy.py b/pandas/tests/series/methods/test_to_numpy.py index 487489e8c0b0c..5fe3e19b0a20b 100644 --- a/pandas/tests/series/methods/test_to_numpy.py +++ b/pandas/tests/series/methods/test_to_numpy.py @@ -15,3 +15,11 @@ def test_to_numpy_na_value(dtype): result = ser...
["pandas/tests/series/methods/test_to_numpy.py::test_to_numpy_cast_before_setting_na"]
["pandas/tests/series/methods/test_to_numpy.py::test_to_numpy_na_value[int64]", "pandas/tests/series/methods/test_to_numpy.py::test_to_numpy_na_value[float64]"]
null
true
2023-01-06T19:12:07Z
1
11
1
2,615
0
0.85
1
0.85
1
0.4725
91.2925
288
swe_gym::train::1663
swe_gym
train
1,663
pandas-dev__pandas-56017
pandas-dev/pandas
pandas-dev/pandas
python
41bb4344327e6dc15b67e530c0aac3517372ba39
BUG: Bad shift_forward ceiling around DST change ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the [m...
take The result "2023-03-26 03:00:00" is expected because when you shift 00:45:00 forwards by 30 mins, it becomes 01:15:00 which is actually 02:15:00 in London DST time. Ceiling it will return 03:00:00. Hope it helps or please correct me if I am wrong. I don't get it, even if we forget the DST: `pd.to_datetime('2023-0...
diff --git a/doc/source/whatsnew/v2.2.0.rst b/doc/source/whatsnew/v2.2.0.rst index efa4a52993a90..1c2a37cb829b9 100644 --- a/doc/source/whatsnew/v2.2.0.rst +++ b/doc/source/whatsnew/v2.2.0.rst @@ -360,7 +360,7 @@ Timezones ^^^^^^^^^ - Bug in :class:`AbstractHolidayCalendar` where timezone data was not propagated when...
diff --git a/pandas/tests/scalar/timestamp/methods/test_tz_localize.py b/pandas/tests/scalar/timestamp/methods/test_tz_localize.py index 247a583bc38f3..9df0a023730de 100644 --- a/pandas/tests/scalar/timestamp/methods/test_tz_localize.py +++ b/pandas/tests/scalar/timestamp/methods/test_tz_localize.py @@ -123,6 +123,44 @...
["pandas/tests/scalar/timestamp/methods/test_tz_localize.py::TestTimestampTZLocalize::test_tz_localize_nonexistent_shift[2023-03-26"]
["pandas/tests/scalar/timestamp/methods/test_tz_localize.py::TestTimestampTZLocalize::test_tz_localize_roundtrip['-02:15'-2014-07-08", "pandas/tests/scalar/timestamp/methods/test_tz_localize.py::TestTimestampTZLocalize::test_tz_localize_roundtrip[zoneinfo.ZoneInfo(key='US/Pacific')-2014-02-01", "pandas/tests/scalar/tim...
null
true
2023-11-17T04:55:07Z
2
11
1
2,609
0
0.85
1
0.85
1
0.4715
91.2895
289
swe_gym::train::1844
swe_gym
train
1,844
pandas-dev__pandas-48085
pandas-dev/pandas
pandas-dev/pandas
python
3a3ed661c0a62b97f6fffc05bbf1fe6769b908cc
ENH: Add `axis` parameter to `add_prefix` and `add_suffix` ### Feature Type - [ ] Adding new functionality to pandas - [ ] Changing existing functionality in pandas - [ ] Removing existing functionality in pandas ### Problem Description `df.add_prefix` and `df.add_suffix` can be used on columns only. Would be supe...
Sounds reasonable to add an `axis` parameter; however, pandas is trying to move away from `inplace` so -1 on adding that parameter new ```df.add_prefix``` and ```df.add_suffix``` needs to implemented for all the data types and it needs to implemented in https://github.com/pandas-dev/pandas/blob/main/pandas/core/frame....
diff --git a/doc/source/whatsnew/v1.6.0.rst b/doc/source/whatsnew/v1.6.0.rst index 83dfacb46784b..6b7ae767d79d4 100644 --- a/doc/source/whatsnew/v1.6.0.rst +++ b/doc/source/whatsnew/v1.6.0.rst @@ -28,7 +28,7 @@ enhancement2 Other enhancements ^^^^^^^^^^^^^^^^^^ -- +- :meth:`Series.add_suffix`, :meth:`DataFrame.add_...
diff --git a/pandas/tests/frame/methods/test_add_prefix_suffix.py b/pandas/tests/frame/methods/test_add_prefix_suffix.py index ea75e9ff51552..92d7cdd7990e1 100644 --- a/pandas/tests/frame/methods/test_add_prefix_suffix.py +++ b/pandas/tests/frame/methods/test_add_prefix_suffix.py @@ -1,3 +1,5 @@ +import pytest + from ...
["pandas/tests/frame/methods/test_add_prefix_suffix.py::test_add_prefix_suffix_axis", "pandas/tests/series/methods/test_add_prefix_suffix.py::test_add_prefix_suffix_axis", "pandas/tests/frame/methods/test_add_prefix_suffix.py::test_add_prefix_suffix_invalid_axis", "pandas/tests/series/methods/test_add_prefix_suffix.py:...
["pandas/tests/frame/methods/test_add_prefix_suffix.py::test_add_prefix_suffix", "pandas/tests/series/methods/test_add_prefix_suffix.py::test_add_prefix_suffix"]
null
true
2022-08-15T12:18:17Z
2
26
4
2,308
0
0.85
1
0.85
1
0.471333
91.289
290
swe_bench_verified::test::394
swe_bench_verified
test
394
sphinx-doc__sphinx-7757
sphinx-doc/sphinx
sphinx-doc/sphinx
python
212fd67b9f0b4fae6a7c3501fdf1a9a5b2801329
The default value for positional only argument has vanished **Describe the bug** The default value for positional only argument has vanished **To Reproduce** Build following document: ``` .. py:function:: foo(a, b=0, /, c=1) ``` Result: <img width="148" alt="スクリーンショット 2020-05-30 23 43 01" src="https://user-images.gi...
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -518,19 +518,34 @@ def signature_from_str(signature: str) -> inspect.Signature: # parameters args = definition.args + defaults = list(args.defaults) params = [] + if hasattr(a...
diff --git a/tests/test_util_inspect.py b/tests/test_util_inspect.py --- a/tests/test_util_inspect.py +++ b/tests/test_util_inspect.py @@ -335,10 +335,14 @@ def test_signature_from_str_kwonly_args(): @pytest.mark.skipif(sys.version_info < (3, 8), reason='python-3.8 or above is required') def test...
["tests/test_util_inspect.py::test_signature_from_str_positionaly_only_args"]
["tests/test_util_inspect.py::test_signature", "tests/test_util_inspect.py::test_signature_partial", "tests/test_util_inspect.py::test_signature_methods", "tests/test_util_inspect.py::test_signature_partialmethod", "tests/test_util_inspect.py::test_signature_annotations", "tests/test_util_inspect.py::test_signature_ann...
null
true
2020-05-30T14:46:01Z
1
25
1
624
0
1
1
0.85
1
0.187333
91.287
291
swe_gym::train::1695
swe_gym
train
1,695
pandas-dev__pandas-47586
pandas-dev/pandas
pandas-dev/pandas
python
bd9a6f09264c58ef402d4c7faf5fc9d48c159194
BUG: concat losing column dtype for extension arrays and object dtype ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this...
This is still true after #47330 extension arrays in the index was an enhancement in 1.4 so any fix could be considered as a backport candidate. This is a bit tricky, because it depends on #47330, which is not really a regression, meaning this would have side effects because _`get_combined_index` is now gaining the orig...
diff --git a/doc/source/whatsnew/v1.5.0.rst b/doc/source/whatsnew/v1.5.0.rst index 6fc1ec9c6ff90..2f5c2bb36f405 100644 --- a/doc/source/whatsnew/v1.5.0.rst +++ b/doc/source/whatsnew/v1.5.0.rst @@ -995,6 +995,7 @@ Reshaping - Bug in :func:`get_dummies` that selected object and categorical dtypes but not string (:issue:...
diff --git a/pandas/tests/reshape/concat/test_index.py b/pandas/tests/reshape/concat/test_index.py index 74a3e93c32ebe..66382eb0e95a9 100644 --- a/pandas/tests/reshape/concat/test_index.py +++ b/pandas/tests/reshape/concat/test_index.py @@ -398,3 +398,14 @@ def test_concat_range_index_result(self): tm.assert_f...
["pandas/tests/reshape/concat/test_index.py::TestMultiIndexConcat::test_concat_index_keep_dtype[Int64]", "pandas/tests/reshape/concat/test_index.py::TestMultiIndexConcat::test_concat_index_keep_dtype[object]"]
["pandas/tests/reshape/concat/test_index.py::TestMultiIndexConcat::test_concat_with_duplicated_levels", "pandas/tests/reshape/concat/test_index.py::TestMultiIndexConcat::test_concat_with_various_multiindex_dtypes[mi2_list0-mi1_list2]", "pandas/tests/reshape/concat/test_index.py::TestIndexConcat::test_concat_copy_index_...
null
true
2022-07-02T23:26:10Z
2
35
2
2,091
0
0.85
1
0.85
1
0.465167
91.2705
292
swe_gym::train::1687
swe_gym
train
1,687
pandas-dev__pandas-49794
pandas-dev/pandas
pandas-dev/pandas
python
b6736b449f3062cf05c224ad738c03cef62e248e
VIS: Can't set xlabel/ylabel on histogram ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I have confirmed this bug exists on the main bran...
More of a "not implemented yet" than a bug. take
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index 0e6d1029d352b..41a141ae65981 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -64,6 +64,7 @@ Other enhancements - :func:`date_range` now supports a ``unit`` keyword ("s", "ms", "us", or "ns") to specif...
diff --git a/pandas/tests/plotting/test_series.py b/pandas/tests/plotting/test_series.py index d9505b4d593e6..3a9aa91002730 100644 --- a/pandas/tests/plotting/test_series.py +++ b/pandas/tests/plotting/test_series.py @@ -807,7 +807,7 @@ def test_style_single_ok(self): "index_name, old_label, new_label", ...
["pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-None--new]", "pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-None--]", "pandas/tests/plotting/test_series.py::TestSeriesPlots::test_xlabel_ylabel_series[hist-old-old-new]"]
["pandas/tests/plotting/test_series.py::TestSeriesPlots::test_standard_colors[#FF0000]", "pandas/tests/plotting/test_series.py::TestSeriesPlots::test_unsorted_index_xlim", "pandas/tests/plotting/test_series.py::TestSeriesPlots::test_kind_both_ways[box]", "pandas/tests/plotting/test_series.py::TestSeriesPlots::test_plot...
null
true
2022-11-19T22:11:15Z
3
17
3
2,440
0
0.85
1
0.85
1
0.463333
91.265
293
swe_gym::train::1650
swe_gym
train
1,650
pandas-dev__pandas-51193
pandas-dev/pandas
pandas-dev/pandas
python
808e56eb2a60685ba167bb2c523e8f844652f46b
BUG: loc.setitem casting dtype to float with all false Indexer and rhs is an empty list ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [X] I h...
The unbearable floatness of nullability (with apologies to The Unbearable Lightness of Being). take the same assignment a second time raises (on main) ```python df = pd.DataFrame({"a": [1, 2]}) df.loc[[False, False]] = [] df.loc[[False, False]] = [] # ValueError: shape mismatch: value array of shape (0,) could...
diff --git a/doc/source/whatsnew/v2.0.0.rst b/doc/source/whatsnew/v2.0.0.rst index ef6bb1340dc69..de3941682f539 100644 --- a/doc/source/whatsnew/v2.0.0.rst +++ b/doc/source/whatsnew/v2.0.0.rst @@ -1200,6 +1200,7 @@ Indexing - Bug in :meth:`Series.loc` raising error for out of bounds end of slice indexer (:issue:`50161...
diff --git a/pandas/tests/series/indexing/test_indexing.py b/pandas/tests/series/indexing/test_indexing.py index 387272eb807e8..f214ade0a31aa 100644 --- a/pandas/tests/series/indexing/test_indexing.py +++ b/pandas/tests/series/indexing/test_indexing.py @@ -382,6 +382,16 @@ def test_getitem_bool_int_key(): ser....
["pandas/tests/series/indexing/test_indexing.py::test_setitem_empty_indexer[indexer3-val0]", "pandas/tests/series/indexing/test_indexing.py::test_setitem_empty_indexer[indexer0-val1]", "pandas/tests/series/indexing/test_indexing.py::test_setitem_empty_indexer[indexer1-val1]", "pandas/tests/series/indexing/test_indexing...
["pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_disallowed_multiindex[key0]", "pandas/tests/series/indexing/test_indexing.py::TestDeprecatedIndexers::test_setitem_dict_and_set_disallowed_multiindex[key2]", "pandas/tests/series/indexing/test_indexing.py::TestDeprecatedI...
null
true
2023-02-06T11:43:38Z
3
21
8
2,359
0
0.85
1
0.85
1
0.463167
91.2645
294
swe_gym::train::1449
swe_gym
train
1,449
pandas-dev__pandas-52426
pandas-dev/pandas
pandas-dev/pandas
python
3ce07cb46986ce59427b601c6878c81633e436eb
BUG: Index on empty frame should be RangeIndex ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [x] I have confirmed this bug exists on the [mai...
When I try to reproduce it for `main` I get: ```python >>> import pandas as pd Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/audeering.local/hwierstorf/git/pandas/pandas/__init__.py", line 22, in <module> from pandas.compat import is_numpy_dev as _is_numpy_dev # pyr...
diff --git a/doc/source/whatsnew/v2.0.1.rst b/doc/source/whatsnew/v2.0.1.rst index 0122c84ba2a8e..179d216c0824b 100644 --- a/doc/source/whatsnew/v2.0.1.rst +++ b/doc/source/whatsnew/v2.0.1.rst @@ -27,7 +27,8 @@ Bug fixes Other ~~~~~ -- +- :class:`DataFrame` created from empty dicts had :attr:`~DataFrame.columns` o...
diff --git a/pandas/tests/frame/constructors/test_from_dict.py b/pandas/tests/frame/constructors/test_from_dict.py index c04213c215f0d..d78924ff9d046 100644 --- a/pandas/tests/frame/constructors/test_from_dict.py +++ b/pandas/tests/frame/constructors/test_from_dict.py @@ -7,6 +7,7 @@ DataFrame, Index, Mu...
["pandas/tests/frame/test_constructors.py::TestDataFrameConstructors::test_empty_constructor_object_index[<lambda>0]", "pandas/tests/io/json/test_pandas.py::TestPandasContainer::test_roundtrip_empty[index-False]", "pandas/tests/io/json/test_pandas.py::TestPandasContainer::test_roundtrip_empty[columns-True]", "pandas/te...
["pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_construction_to_datetimelike_unit[ns-m-float64]", "pandas/tests/frame/test_constructors.py::TestDataFrameConstructors::test_dict_nocopy[Float32-M8[ns]-False]", "pandas/tests/series/test_constructors.py::TestSeriesConstructors::test_constructor_str...
null
true
2023-04-04T22:18:16Z
3
7
11
2,627
0
0.85
1
0.85
1
0.461167
91.2585
295
swe_gym::train::1100
swe_gym
train
1,100
pydantic__pydantic-9004
pydantic/pydantic
pydantic/pydantic
python
325ddf65af3ce01619b6ed028a6322d71f3c3c49
It is possible to instantiate model with `model_config` field without exceptions ### Initial Checks - [X] I confirm that I'm using Pydantic V2 ### Description Hello! I am aware that `model_config` should be `ConfigDict()` and this is class/instance attribute as written in documentation. I was trying to fix this be...
@tribunsky-kir, I'd agree that the error messages (or warning messages) could be improved in the above cases. I'll leave this issue open as an opportunity to improve those. There is not currently support for having a field named `model_config`, and I don't think that is something we're likely to support in the ne...
diff --git a/pydantic/_internal/_config.py b/pydantic/_internal/_config.py --- a/pydantic/_internal/_config.py +++ b/pydantic/_internal/_config.py @@ -116,6 +116,13 @@ def for_model(cls, bases: tuple[type[Any], ...], namespace: dict[str, Any], kwar config_class_from_namespace = namespace.get('Config') ...
diff --git a/tests/test_config.py b/tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -796,3 +796,26 @@ def create_partial(model, optionals): # AssertionError: assert ['a', 'b'] == ['b'] assert partial.model_json_schema()['required'] == ['b'] + + +def test_model_config_as_model_f...
["tests/test_config.py::test_model_config_as_model_field_raises"]
["tests/test_config.py::TestsBaseConfig::test_base_config_parse_model_with_strict_config_disabled", "tests/test_config.py::test_config_wrapper_repr[config1-ConfigWrapper(title='test')]", "tests/test_config.py::TestsBaseConfig::test_str_to_lower[True-ABCDefG-abcdefg]", "tests/test_config.py::test_config_model_defer_buil...
null
true
2024-03-13T18:15:35Z
2
8
1
2,601
0
0.85
1
0.85
1
0.460167
91.2555
296
swe_gym::train::743
swe_gym
train
743
iterative__dvc-1965
iterative/dvc
iterative/dvc
python
92cc9f7e6f19f3b92f43e28131fe50c20b297214
DVC could use the unix SSH client config files Hi, The reasoning for this feature request is: *In a team where all members uses SSH to a compute server from individual machines with individual credentials, it is sometimes normal practice to use the SSH client config file to define the host settings. See [this website](...
For the record: Another user on discord was using these configs https://discordapp.com/channels/485586884165107732/485596304961962003/573519544153538566 .
diff --git a/dvc/remote/ssh/__init__.py b/dvc/remote/ssh/__init__.py --- a/dvc/remote/ssh/__init__.py +++ b/dvc/remote/ssh/__init__.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals +import os import getpass import logging @@ -38,18 +39,26 @@ def __init__(self, repo, config): parsed = urlpars...
diff --git a/tests/requirements.txt b/tests/requirements.txt --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -4,7 +4,7 @@ pytest-cov>=2.6.1 pytest-xdist>=1.26.1 pytest-mock>=1.10.4 flaky>=3.5.3 -mock>=2.0.0 +mock>=3.0.0 xmltodict>=0.11.0 awscli>=1.16.125 google-compute-engine diff --git a/tests/unit/...
["tests/unit/remote/ssh/test_ssh.py::test_ssh_user[config4-test2]", "tests/unit/remote/ssh/test_ssh.py::test_ssh_keyfile[config1-/root/.ssh/not_default.key]", "tests/unit/remote/ssh/test_ssh.py::test_ssh_port[config2-4321]", "tests/unit/remote/ssh/test_ssh.py::test_ssh_user[config5-root]", "tests/unit/remote/ssh/test_s...
["tests/unit/remote/ssh/test_ssh.py::TestRemoteSSH::test_no_path", "tests/unit/remote/ssh/test_ssh.py::TestRemoteSSH::test_url"]
null
true
2019-05-04T16:49:05Z
1
40
18
1,949
0
0.85
1
0.85
1
0.458167
91.2495
297
swe_gym::train::1270
swe_gym
train
1,270
pandas-dev__pandas-48169
pandas-dev/pandas
pandas-dev/pandas
python
cf88cc14787bd4d1c769e269ec5f0469b2eea820
BUG: DataFrame.select_dtypes(include='number') includes BooleanDtype columns ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirm...
take Hey @macks22. I was able to recreate this issue on a different OS as well. I am going to start looking into the sourcecode, specifically the df.select_dtypes function to see if I can find what's up. @macks22 I agree that there is an issue for this function in differentiating between what it considers to be bool v...
diff --git a/doc/source/whatsnew/v1.4.4.rst b/doc/source/whatsnew/v1.4.4.rst index 3414082581b80..2f290217bf985 100644 --- a/doc/source/whatsnew/v1.4.4.rst +++ b/doc/source/whatsnew/v1.4.4.rst @@ -17,6 +17,7 @@ Fixed regressions - Fixed regression in taking NULL :class:`objects` from a :class:`DataFrame` causing a seg...
diff --git a/pandas/tests/frame/methods/test_select_dtypes.py b/pandas/tests/frame/methods/test_select_dtypes.py index 9da6b61e67603..6ff5a41b67ec2 100644 --- a/pandas/tests/frame/methods/test_select_dtypes.py +++ b/pandas/tests/frame/methods/test_select_dtypes.py @@ -441,3 +441,18 @@ def test_select_dtypes_float_dtype...
["pandas/tests/frame/methods/test_select_dtypes.py::TestSelectDtypes::test_np_bool_ea_boolean_include_number"]
["pandas/tests/frame/methods/test_select_dtypes.py::TestSelectDtypes::test_select_dtypes_float_dtype[expected0-float]", "pandas/tests/frame/methods/test_select_dtypes.py::TestSelectDtypes::test_select_dtypes_str_raises[exclude-bytes_]", "pandas/tests/frame/methods/test_select_dtypes.py::TestSelectDtypes::test_select_dt...
null
true
2022-08-19T22:01:22Z
2
6
1
2,616
0
0.85
1
0.85
1
0.456
91.243
298
swe_gym::train::253
swe_gym
train
253
getmoto__moto-6637
getmoto/moto
getmoto/moto
python
303b1b92cbfaf6d8ec034d50ec4edfc15fb588d3
IAM-like access control doesn't work with specified `Resource` key in policy ## Issue It seems like the [IAM-like access control](https://docs.getmoto.org/en/latest/docs/iam.html) doesn't work when specifying the `Resource` key in the policy. Everthing works well with `"Resource": "*"` but without the wildcard the acc...
Hi @Haegi, we currently don't take the Resource-key into account at all. Marking it as an enhancement to improve this area.
diff --git a/moto/core/responses.py b/moto/core/responses.py --- a/moto/core/responses.py +++ b/moto/core/responses.py @@ -128,7 +128,9 @@ def response_template(self, source: str) -> Template: class ActionAuthenticatorMixin(object): request_count: ClassVar[int] = 0 - def _authenticate_and_authorize_action(se...
diff --git a/tests/test_core/test_auth.py b/tests/test_core/test_auth.py --- a/tests/test_core/test_auth.py +++ b/tests/test_core/test_auth.py @@ -766,3 +766,68 @@ def test_s3_invalid_token_with_temporary_credentials(): assert err["Code"] == "InvalidToken" assert ex.value.response["ResponseMetadata"]["HTTPSta...
["tests/test_core/test_auth.py::test_allow_key_access_using_resource_arn", "tests/test_core/test_auth.py::test_allow_bucket_access_using_resource_arn"]
["tests/test_core/test_auth.py::test_s3_access_denied_with_denying_attached_group_policy", "tests/test_core/test_auth.py::test_allowed_with_wildcard_action", "tests/test_core/test_auth.py::test_access_denied_for_run_instances", "tests/test_core/test_auth.py::test_access_denied_with_no_policy", "tests/test_core/test_aut...
null
true
2023-08-11 21:18:13
3
53
2
1,668
0
0.85
1
0.85
1
0.454667
91.239
299
swe_gym::train::1364
swe_gym
train
1,364
pandas-dev__pandas-55930
pandas-dev/pandas
pandas-dev/pandas
python
486c723191119b69259ff8c9cb23e223c8a96491
BUG: No kwargs in `df.apply(raw=True)` ### Pandas version checks - [X] I have checked that this issue has not already been reported. - [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas. - [ ] I have confirmed this bug exists on the [main branch...
hi @erezinman in updated pandas version i am not getting error >>> import pandas as pd >>> def func(a, b): return a + b >>> df = pd.DataFrame([[1, 2], [3, 4]]) >>> a=df.apply(func, b=2) # OK >>> print(a) 0 1 0 3 4 1 5 6 >>> df.apply(func, raw=True, b=1) 0 1 0 2 3 1 4 5 >>> p...
diff --git a/doc/source/whatsnew/v2.1.4.rst b/doc/source/whatsnew/v2.1.4.rst index 04bbb0f806cbd..d61714d9473c6 100644 --- a/doc/source/whatsnew/v2.1.4.rst +++ b/doc/source/whatsnew/v2.1.4.rst @@ -21,7 +21,7 @@ Fixed regressions Bug fixes ~~~~~~~~~ -- +- Bug in :meth:`DataFrame.apply` where passing ``raw=True`` ign...
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index 3a3f73a68374b..92612861e551a 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -38,8 +38,9 @@ def test_apply(float_frame): @pytest.mark.parametrize("axis", [0, 1]) -d...
["pandas/tests/apply/test_frame_apply.py::test_apply_args[True-0]", "pandas/tests/apply/test_frame_apply.py::test_apply_args[True-1]"]
["pandas/tests/apply/test_frame_apply.py::test_dictlike_lambda[ops2-compat-expected2]", "pandas/tests/apply/test_frame_apply.py::test_result_type_series_result_other_index", "pandas/tests/apply/test_frame_apply.py::test_size_as_str[axis=0-agg]", "pandas/tests/apply/test_frame_apply.py::test_agg_axis1_duplicate_index[da...
null
true
2023-11-12T19:57:19Z
2
6
2
2,604
0
0.85
1
0.85
1
0.454
91.237