Skip to content

Commit f11a5d2

Browse files
committed
Merge branch 'main' of https://github.com/pandas-dev/pandas into main
2 parents 67088cf + b0a51fe commit f11a5d2

File tree

334 files changed

+8191
-2694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+8191
-2694
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Feature Request
2+
description: Suggest an idea for pandas
3+
title: "ENH: "
4+
labels: [Enhancement, Needs Triage]
5+
6+
body:
7+
- type: checkboxes
8+
id: checks
9+
attributes:
10+
label: Feature Type
11+
description: Please check what type of feature request you would like to propose.
12+
options:
13+
- label: >
14+
Adding new functionality to pandas
15+
- label: >
16+
Changing existing functionality in pandas
17+
- label: >
18+
Removing existing functionality in pandas
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Problem Description
23+
description: >
24+
Please describe what problem the feature would solve, e.g. "I wish I could use pandas to ..."
25+
placeholder: >
26+
I wish I could use pandas to return a Series from a DataFrame when possible.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: feature
31+
attributes:
32+
label: Feature Description
33+
description: >
34+
Please describe how the new feature would be implemented, using psudocode if relevant.
35+
placeholder: >
36+
Add a new parameter to DataFrame, to_series, to return a Series if possible.
37+
38+
def __init__(self, ..., to_series: bool=False):
39+
"""
40+
Parameters
41+
----------
42+
...
43+
44+
to_series : bool, default False
45+
Return a Series if possible
46+
"""
47+
if to_series:
48+
return Series(data)
49+
validations:
50+
required: true
51+
- type: textarea
52+
id: alternative
53+
attributes:
54+
label: Alternative Solutions
55+
description: >
56+
Please describe any alternative solution (existing functionality, 3rd party package, etc.)
57+
that would satisfy the feature request.
58+
placeholder: >
59+
Write a custom function to return a Series when possible.
60+
61+
def to_series(...)
62+
result = pd.DataFrame(...)
63+
...
64+
validations:
65+
required: true
66+
- type: textarea
67+
id: context
68+
attributes:
69+
label: Additional Context
70+
description: >
71+
Please provide any relevant Github issues, code examples or references that help describe and support
72+
the feature request.

.github/workflows/32-bit-linux.yml

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
paths-ignore:
1313
- "doc/**"
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
pytest:
1720
runs-on: ubuntu-latest

.github/workflows/assign.yml

+6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
issue_comment:
44
types: created
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
issue_assign:
11+
permissions:
12+
issues: write
13+
pull-requests: write
814
runs-on: ubuntu-latest
915
steps:
1016
- if: github.event.comment.body == 'take'

.github/workflows/asv-bot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ env:
99
ENV_FILE: environment.yml
1010
COMMENT: ${{github.event.comment.body}}
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
autotune:
17+
permissions:
18+
contents: read
19+
issues: write
20+
pull-requests: write
1421
name: "Run benchmarks"
1522
# TODO: Support more benchmarking options later, against different branches, against self, etc
1623
if: startsWith(github.event.comment.body, '@github-actions benchmark')

.github/workflows/autoupdate-pre-commit-config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ on:
55
- cron: "0 7 1 * *" # At 07:00 on 1st of every month.
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
update-pre-commit:
13+
permissions:
14+
contents: write # for technote-space/create-pr-action to push code
15+
pull-requests: write # for technote-space/create-pr-action to create a PR
1016
if: github.repository_owner == 'pandas-dev'
1117
name: Autoupdate pre-commit config
1218
runs-on: ubuntu-latest

.github/workflows/code-checks.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
ENV_FILE: environment.yml
1515
PANDAS_CI: 1
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
pre_commit:
1922
name: pre-commit

.github/workflows/docbuild-and-upload.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
ENV_FILE: environment.yml
1515
PANDAS_CI: 1
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
web_and_docs:
1922
name: Doc Build and Upload

.github/workflows/macos-windows.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ env:
1818
PATTERN: "not slow and not db and not network and not single_cpu"
1919

2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
pytest:
2326
defaults:
2427
run:
2528
shell: bash -el {0}
26-
timeout-minutes: 90
29+
timeout-minutes: 120
2730
strategy:
2831
matrix:
2932
os: [macos-latest, windows-latest]

.github/workflows/python-dev.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ env:
2727
COVERAGE: true
2828
PYTEST_TARGET: pandas
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
build:
3235
if: false # Comment this line out to "unfreeze"

.github/workflows/sdist.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
paths-ignore:
1414
- "doc/**"
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}

.github/workflows/stale-pr.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
# * is a special character in YAML so you have to quote this string
55
- cron: "0 0 * * *"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
stale:
12+
permissions:
13+
pull-requests: write
914
runs-on: ubuntu-latest
1015
steps:
1116
- uses: actions/stale@v4

.github/workflows/ubuntu.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
env:
1616
PANDAS_CI: 1
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
pytest:
2023
runs-on: ubuntu-latest

.pre-commit-config.yaml

+25-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
pass_filenames: true
1919
require_serial: false
2020
- repo: https://github.com/python/black
21-
rev: 22.3.0
21+
rev: 22.6.0
2222
hooks:
2323
- id: black
2424
- repo: https://github.com/codespell-project/codespell
@@ -27,7 +27,7 @@ repos:
2727
- id: codespell
2828
types_or: [python, rst, markdown]
2929
- repo: https://github.com/pre-commit/pre-commit-hooks
30-
rev: v4.2.0
30+
rev: v4.3.0
3131
hooks:
3232
- id: debug-statements
3333
- id: end-of-file-fixer
@@ -59,7 +59,7 @@ repos:
5959
hooks:
6060
- id: isort
6161
- repo: https://github.com/asottile/pyupgrade
62-
rev: v2.32.1
62+
rev: v2.34.0
6363
hooks:
6464
- id: pyupgrade
6565
args: [--py38-plus]
@@ -74,7 +74,7 @@ repos:
7474
types: [text] # overwrite types: [rst]
7575
types_or: [python, rst]
7676
- repo: https://github.com/sphinx-contrib/sphinx-lint
77-
rev: v0.6
77+
rev: v0.6.1
7878
hooks:
7979
- id: sphinx-lint
8080
- repo: https://github.com/asottile/yesqa
@@ -93,9 +93,7 @@ repos:
9393
types: [python]
9494
stages: [manual]
9595
additional_dependencies: &pyright_dependencies
96-
97-
- repo: local
98-
hooks:
96+
9997
- id: pyright_reportGeneralTypeIssues
10098
name: pyright reportGeneralTypeIssues
10199
entry: pyright --skipunannotated -p pyright_reportGeneralTypeIssues.json
@@ -105,8 +103,6 @@ repos:
105103
types: [python]
106104
stages: [manual]
107105
additional_dependencies: *pyright_dependencies
108-
- repo: local
109-
hooks:
110106
- id: mypy
111107
name: mypy
112108
entry: mypy
@@ -115,8 +111,6 @@ repos:
115111
pass_filenames: false
116112
types: [python]
117113
stages: [manual]
118-
- repo: local
119-
hooks:
120114
- id: flake8-rst
121115
name: flake8-rst
122116
description: Run flake8 on code snippets in docstrings or RST files
@@ -229,3 +223,23 @@ repos:
229223
entry: python scripts/validate_min_versions_in_sync.py
230224
language: python
231225
files: ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
226+
- id: flake8-pyi
227+
name: flake8-pyi
228+
entry: flake8 --extend-ignore=E301,E302,E305,E701,E704
229+
types: [pyi]
230+
language: python
231+
additional_dependencies:
232+
- flake8==4.0.1
233+
- flake8-pyi==22.5.1
234+
- id: future-annotations
235+
name: import annotations from __future__
236+
entry: 'from __future__ import annotations'
237+
language: pygrep
238+
args: [--negate]
239+
files: ^pandas/
240+
types: [python]
241+
exclude: |
242+
(?x)
243+
/(__init__\.py)|(api\.py)|(_version\.py)|(testing\.py)|(conftest\.py)$
244+
|/tests/
245+
|/_testing/

CITATION.cff

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cff-version: 1.2.0
2+
title: 'pandas-dev/pandas: Pandas'
3+
message: 'If you use this software, please cite it as below.'
4+
authors:
5+
- name: "The pandas development team"
6+
license: BSD-3-Clause
7+
license-url: "https://github.com/pandas-dev/pandas/blob/main/LICENSE"
8+
repository-code: "https://github.com/pandas-dev/pandas"
9+
type: software
10+
url: "https://github.com/pandas-dev/pandas"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,4 @@ Or maybe through using pandas you have an idea of your own or are looking for so
169169

170170
Feel free to ask questions on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas).
171171

172-
As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/pandas/blob/main/.github/CODE_OF_CONDUCT.md)
172+
As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/.github/blob/master/CODE_OF_CONDUCT.md)

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Release Notes
22
=============
33

4-
The list of changes to Pandas between each release can be found
4+
The list of changes to pandas between each release can be found
55
[here](https://pandas.pydata.org/pandas-docs/stable/whatsnew/index.html). For full
66
details, see the commit logs at https://github.com/pandas-dev/pandas.

doc/redirects.csv

+1
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ generated/pandas.IntervalIndex.mid,../reference/api/pandas.IntervalIndex.mid
761761
generated/pandas.IntervalIndex.overlaps,../reference/api/pandas.IntervalIndex.overlaps
762762
generated/pandas.IntervalIndex.right,../reference/api/pandas.IntervalIndex.right
763763
generated/pandas.IntervalIndex.set_closed,../reference/api/pandas.IntervalIndex.set_closed
764+
generated/pandas.IntervalIndex.set_inclusive,../reference/api/pandas.IntervalIndex.set_inclusive
764765
generated/pandas.IntervalIndex.to_tuples,../reference/api/pandas.IntervalIndex.to_tuples
765766
generated/pandas.IntervalIndex.values,../reference/api/pandas.IntervalIndex.values
766767
generated/pandas.Interval.left,../reference/api/pandas.Interval.left

0 commit comments

Comments
 (0)