QST: pd.series indexing True auto 0 change

This issue has been created since 2022-09-20.

Research

  • I have searched the [pandas] tag on StackOverflow for similar questions.

  • I have asked my usage related question on StackOverflow.

Link to question on StackOverflow

https://stackoverflow.com/questions/73783112/1-4-4-other-1-5-0-pd-series-indexing-true-auto-0-change

Question about pandas

test = pd.Series({True: 0, False: 0})

1.4.4
print(test[0])
> 0

but 
1.5.0
print(test[True])

> keyerror 0

1.4.4 and 1.5.0 What has changed?I can't find it

phofl wrote this answer on 2022-09-20

Hi, thanks for your report. test[True] works for me while test[0] does not. We are now supporting a boolean index, see #45061

@jbrockmendel I guess this is the correct behavior now?

jbrockmendel wrote this answer on 2022-09-21

test.loc[1] should definitely raise, but it may be that test.index._should_fallback_to_positional should be True, in which case the __getitem__ call should still work (but would have different behavior on test[::-1])

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-09-29
Star Count 35373
Watcher Count 1123
Fork Count 15031
Issue Count 3581

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
justoverclock/flarum-ext-welcomebox 1 2021-12-25 2022-09-07
Decode from iterator 7 2019-04-27 2022-09-16
Enhancement: Disscution Page 1 2022-02-07 2022-09-25
Failed to execute script elmocut 6 2021-07-25 2022-07-17
Compatibility with crpiframeplayer ? 2 2022-01-23 2022-08-15
It's just completely broken on crunchyroll 13 2022-03-16 2022-09-10
FALTANDO ARQUIVO ZIP 0 2020-08-24 2021-12-21
A lot of the Lark server-side API has changed 0 2021-06-16 2022-09-25
TypeError: FormattedValue constructor takes either 0 or 3 positional arguments 2 2022-02-14 2022-09-14
Using named() with enum constants crashes the app (when locale is set to Turkish) 3 2021-08-16 2022-09-22
installr returns exit code 0 even when package fails to install 3 2022-01-05 2022-09-10
This plugin generated a warning from the characteristic 'Filter Life Level': characteristic value expected valid finite number and received "NaN" (number) 4 2021-05-05 2022-09-03
Version 9 Elemental Theme Error PHP8 5 2021-10-29 2022-09-14
Converting Optional String parameter into an IPAddress class variable 9 2021-07-23 2022-09-21
Rice Fixes 7 2021-03-02 2022-01-11
Mintapi fails when installing on python2.7 due to dependencies requiring python>=3.6 8 2021-11-07 2022-08-16
Invalid Property name "_items" in Asset Families and Assets 1 2021-06-23 2022-08-18
Image caption styling can not be changed 0 2021-02-02 2022-09-03
File upload not working on Froala 3.2.4 and 3.2.5 3 2021-01-07 2022-09-03
Add design mock-up preview side-by-side to the device previews 0 2021-12-07 2022-09-14
Remove field data sanitization from hook_field_load() 0 2022-06-02 2022-08-08
`uri callback` needs complete removal or documentation 5 2022-06-02 2022-08-08
Release workflows 1.0.0 1 2022-07-05 2022-09-15
`step_lag` induced missingness has unexpected behaviour 3 2022-06-03 2022-09-15
Request: Add Enterprise option for WiFi encryption types 1 2020-09-10 2022-07-30
Mark tracks that we can only preview 2 2021-04-06 2022-09-03
Quasi-bug: TEAL Output Depends not Only on Compiler But on Python's Hash in Unpredictable Ways 2 2022-02-17 2022-09-25
Container package registry login does not respect 2fa 2 2022-08-01 2022-09-19
primary key is uuid convert fail on v1.23.3 3 2022-03-31 2022-09-25
How to support protoc-gen-go better in goctl? 1 2021-11-10 2022-09-05
Update cpanfile 1 2018-05-14 2022-01-16
eel.js:1 Uncaught ReferenceError: eel is not defined at eel.js:1 2 2021-06-11 2022-09-25
MQTT with SSL not working anymore 2 2021-08-31 2022-09-28
Drop gold beyond reach 11 2021-11-12 2022-09-01
[foxfooding] Mozilla VPN settings Page prompts me to sign in again, even though I am already signed in 1 2022-06-06 2022-09-25
The `hyperformula` package is missing from the `dist` directory. 2 2021-12-10 2022-09-14
egress-selector-mode using flannel over wireguard 3 2022-06-23 2022-09-14
Could not save annotations. Error: Request failed with status code 401. Detail: invalid token. 2 2022-05-05 2022-09-28
Error sending transaction: Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-3200 8 2020-12-17 2022-09-05
Better progress reporting during initial tool setup 13 2020-07-10 2022-09-23
Services don't resume sending spans after an agent outage 0 2021-10-14 2022-09-27
[Feature/Enhancement Request] Support browsing/viewing files & line numbers/ranges 1 2022-06-07 2022-09-29
[Crash] [release/v4.4] LoadProhibited in esp_wifi/src/wifi_netif.c:110, when switching from STA to AP (IDFGH-7092) 15 2022-04-01 2022-09-25
Does not work, nothing happens when saving 16 2017-11-13 2022-09-16
Define layout and organization of the repository 0 2021-09-11 2022-07-26
Implement TokenRequestContext in azure_core 0 2021-11-16 2022-09-20
SAML authentication with azure ad? 0 2022-06-02 2022-09-22
🐞 Bug: internal server error when reload routes with query params 2 2022-03-14 2022-09-14
Comment widget disappears after adding comment 3 2022-02-23 2022-09-13
aws_s3_bucket lifecycle encryption versus new aws_s3_bucket_... resources 6 2022-03-18 2022-09-15