Skip to content

Commit bfb29ff

Browse files
Fixed conflict in whats new
2 parents 546edb6 + a44ac34 commit bfb29ff

File tree

188 files changed

+4179
-3529
lines changed

Some content is hidden

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

188 files changed

+4179
-3529
lines changed

.github/ISSUE_TEMPLATE.md

-29
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
3+
name: Bug Report
4+
about: Create a bug report to help us improve pandas
5+
title: "BUG:"
6+
labels: "Bug, Needs Triage"
7+
8+
---
9+
10+
- [ ] I have checked that this issue has not already been reported.
11+
12+
- [ ] I have confirmed this bug exists on the latest version of pandas.
13+
14+
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.
15+
16+
---
17+
18+
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.
19+
20+
#### Code Sample, a copy-pastable example
21+
22+
```python
23+
# Your code here
24+
25+
```
26+
27+
#### Problem description
28+
29+
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution]
30+
31+
#### Expected Output
32+
33+
#### Output of ``pd.show_versions()``
34+
35+
<details>
36+
37+
[paste the output of ``pd.show_versions()`` here leaving a blank line after the details tag]
38+
39+
</details>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
name: Documentation Improvement
4+
about: Report wrong or missing documentation
5+
title: "DOC:"
6+
labels: "Docs, Needs Triage"
7+
8+
---
9+
10+
#### Location of the documentation
11+
12+
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://dev.pandas.io/docs/reference/api/pandas.read_csv.html"]
13+
14+
**Note**: You can check the latest versions of the docs on `master` [here](https://dev.pandas.io/docs).
15+
16+
#### Documentation problem
17+
18+
[this should provide a description of what documentation you believe needs to be fixed/improved]
19+
20+
#### Suggested fix for documentation
21+
22+
[this should explain the suggested fix and **why** it's better than the existing documentation]
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
3+
name: Feature Request
4+
about: Suggest an idea for pandas
5+
title: "ENH:"
6+
labels: "Enhancement, Needs Triage"
7+
8+
---
9+
10+
#### Is your feature request related to a problem?
11+
12+
[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"]
13+
14+
#### Describe the solution you'd like
15+
16+
[this should provide a description of the feature request, e.g. "`DataFrame.foo` should get a new parameter `bar` that [...]", try to write a docstring for the desired feature]
17+
18+
#### API breaking implications
19+
20+
[this should provide a description of how this feature will affect the API]
21+
22+
#### Describe alternatives you've considered
23+
24+
[this should provide a description of any alternative solutions or features you've considered]
25+
26+
#### Additional context
27+
28+
[add any other context, code examples, or references to existing implementations about the feature request here]
29+
30+
```python
31+
# Your code here, if applicable
32+
33+
```
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
name: Submit Question
4+
about: Ask a general question about pandas
5+
title: "QST:"
6+
labels: "Usage Question, Needs Triage"
7+
8+
---
9+
10+
- [ ] I have searched the [[pandas] tag](https://stackoverflow.com/questions/tagged/pandas) on StackOverflow for similar questions.
11+
12+
- [ ] I have asked my usage related question on [StackOverflow](https://stackoverflow.com).
13+
14+
---
15+
16+
#### Question about pandas
17+
18+
**Note**: If you'd still like to submit a question, please read [this guide](
19+
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your question.
20+
21+
```python
22+
# Your code here, if applicable
23+
24+
```

asv_bench/benchmarks/arithmetic.py

+17
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ def time_frame_op_with_scalar(self, dtype, scalar, op):
5050
op(self.df, scalar)
5151

5252

53+
class OpWithFillValue:
54+
def setup(self):
55+
# GH#31300
56+
arr = np.arange(10 ** 6)
57+
df = DataFrame({"A": arr})
58+
ser = df["A"]
59+
60+
self.df = df
61+
self.ser = ser
62+
63+
def time_frame_op_with_fill_value_no_nas(self):
64+
self.df.add(self.df, fill_value=4)
65+
66+
def time_series_op_with_fill_value_no_nas(self):
67+
self.ser.add(self.ser, fill_value=4)
68+
69+
5370
class MixedFrameWithSeriesAxis0:
5471
params = [
5572
[

asv_bench/benchmarks/frame_methods.py

+13
Original file line numberDiff line numberDiff line change
@@ -619,4 +619,17 @@ def time_select_dtypes(self, n):
619619
self.df.select_dtypes(include="int")
620620

621621

622+
class MemoryUsage:
623+
def setup(self):
624+
self.df = DataFrame(np.random.randn(100000, 2), columns=list("AB"))
625+
self.df2 = self.df.copy()
626+
self.df2["A"] = self.df2["A"].astype("object")
627+
628+
def time_memory_usage(self):
629+
self.df.memory_usage(deep=True)
630+
631+
def time_memory_usage_object_dtype(self):
632+
self.df2.memory_usage(deep=True)
633+
634+
622635
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/code_checks.sh

+30-27
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
121121

122122
# Imports - Check formatting using isort see setup.cfg for settings
123123
MSG='Check import format using isort' ; echo $MSG
124-
ISORT_CMD="isort --quiet --recursive --check-only pandas asv_bench"
124+
ISORT_CMD="isort --quiet --recursive --check-only pandas asv_bench scripts"
125125
if [[ "$GITHUB_ACTIONS" == "true" ]]; then
126126
eval $ISORT_CMD | awk '{print "##[error]" $0}'; RET=$(($RET + ${PIPESTATUS[0]}))
127127
else
@@ -266,63 +266,66 @@ fi
266266
### DOCTESTS ###
267267
if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
268268

269+
# Individual files
270+
271+
MSG='Doctests base.py' ; echo $MSG
272+
pytest -q --doctest-modules pandas/core/base.py
273+
RET=$(($RET + $?)) ; echo $MSG "DONE"
274+
275+
MSG='Doctests construction.py' ; echo $MSG
276+
pytest -q --doctest-modules pandas/core/construction.py
277+
RET=$(($RET + $?)) ; echo $MSG "DONE"
278+
269279
MSG='Doctests frame.py' ; echo $MSG
270280
pytest -q --doctest-modules pandas/core/frame.py
271281
RET=$(($RET + $?)) ; echo $MSG "DONE"
272282

273-
MSG='Doctests series.py' ; echo $MSG
274-
pytest -q --doctest-modules pandas/core/series.py \
275-
-k"-nonzero -reindex -searchsorted -to_dict"
283+
MSG='Doctests generic.py' ; echo $MSG
284+
pytest -q --doctest-modules pandas/core/generic.py
276285
RET=$(($RET + $?)) ; echo $MSG "DONE"
277286

278287
MSG='Doctests groupby.py' ; echo $MSG
279288
pytest -q --doctest-modules pandas/core/groupby/groupby.py -k"-cumcount -describe -pipe"
280289
RET=$(($RET + $?)) ; echo $MSG "DONE"
281290

282-
MSG='Doctests datetimes.py' ; echo $MSG
283-
pytest -q --doctest-modules pandas/core/tools/datetimes.py
291+
MSG='Doctests series.py' ; echo $MSG
292+
pytest -q --doctest-modules pandas/core/series.py
284293
RET=$(($RET + $?)) ; echo $MSG "DONE"
285294

286-
MSG='Doctests reshaping functions' ; echo $MSG
287-
pytest -q --doctest-modules pandas/core/reshape/
288-
RET=$(($RET + $?)) ; echo $MSG "DONE"
295+
# Directories
289296

290-
MSG='Doctests interval classes' ; echo $MSG
291-
pytest -q --doctest-modules \
292-
pandas/core/indexes/interval.py \
293-
pandas/core/arrays/interval.py
297+
MSG='Doctests arrays'; echo $MSG
298+
pytest -q --doctest-modules pandas/core/arrays/
294299
RET=$(($RET + $?)) ; echo $MSG "DONE"
295300

296-
MSG='Doctests arrays'; echo $MSG
297-
pytest -q --doctest-modules \
298-
pandas/core/arrays/string_.py \
299-
pandas/core/arrays/integer.py \
300-
pandas/core/arrays/boolean.py
301+
MSG='Doctests computation' ; echo $MSG
302+
pytest -q --doctest-modules pandas/core/computation/
301303
RET=$(($RET + $?)) ; echo $MSG "DONE"
302304

303305
MSG='Doctests dtypes'; echo $MSG
304306
pytest -q --doctest-modules pandas/core/dtypes/
305307
RET=$(($RET + $?)) ; echo $MSG "DONE"
306308

307-
MSG='Doctests arrays/boolean.py' ; echo $MSG
308-
pytest -q --doctest-modules pandas/core/arrays/boolean.py
309+
MSG='Doctests indexes' ; echo $MSG
310+
pytest -q --doctest-modules pandas/core/indexes/
309311
RET=$(($RET + $?)) ; echo $MSG "DONE"
310312

311-
MSG='Doctests base.py' ; echo $MSG
312-
pytest -q --doctest-modules pandas/core/base.py
313+
MSG='Doctests ops' ; echo $MSG
314+
pytest -q --doctest-modules pandas/core/ops/
313315
RET=$(($RET + $?)) ; echo $MSG "DONE"
314316

315-
MSG='Doctests construction.py' ; echo $MSG
316-
pytest -q --doctest-modules pandas/core/construction.py
317+
MSG='Doctests reshape' ; echo $MSG
318+
pytest -q --doctest-modules pandas/core/reshape/
317319
RET=$(($RET + $?)) ; echo $MSG "DONE"
318320

319-
MSG='Doctests generic.py' ; echo $MSG
320-
pytest -q --doctest-modules pandas/core/generic.py
321+
MSG='Doctests tools' ; echo $MSG
322+
pytest -q --doctest-modules pandas/core/tools/
321323
RET=$(($RET + $?)) ; echo $MSG "DONE"
322324

323325
MSG='Doctests tseries' ; echo $MSG
324326
pytest -q --doctest-modules pandas/tseries/
325327
RET=$(($RET + $?)) ; echo $MSG "DONE"
328+
326329
fi
327330

328331
### DOCSTRINGS ###
@@ -333,7 +336,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
333336
RET=$(($RET + $?)) ; echo $MSG "DONE"
334337

335338
MSG='Validate correct capitalization among titles in documentation' ; echo $MSG
336-
$BASE_DIR/scripts/validate_rst_title_capitalization.py $BASE_DIR/doc/source/development/contributing.rst
339+
$BASE_DIR/scripts/validate_rst_title_capitalization.py $BASE_DIR/doc/source/development/contributing.rst $BASE_DIR/doc/source/reference
337340
RET=$(($RET + $?)) ; echo $MSG "DONE"
338341

339342
fi

doc/source/development/code_style.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ consistent code format throughout the project. For details see the
1818
Patterns
1919
========
2020

21-
foo.__class__
22-
-------------
21+
Using foo.__class__
22+
-------------------
2323

2424

2525
pandas uses 'type(foo)' instead 'foo.__class__' as it is making the code more
@@ -47,8 +47,8 @@ String formatting
4747
Concatenated strings
4848
--------------------
4949

50-
f-strings
51-
~~~~~~~~~
50+
Using f-strings
51+
~~~~~~~~~~~~~~~
5252

5353
pandas uses f-strings formatting instead of '%' and '.format()' string formatters.
5454

doc/source/development/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Below is a brief overview on how to set-up a virtual environment with Powershell
295295
under Windows. For details please refer to the
296296
`official virtualenv user guide <https://virtualenv.pypa.io/en/stable/userguide/#activate-script>`__
297297

298-
Use an ENV_DIR of your choice. We'll use ~\virtualenvs\pandas-dev where
298+
Use an ENV_DIR of your choice. We'll use ~\\virtualenvs\\pandas-dev where
299299
'~' is the folder pointed to by either $env:USERPROFILE (Powershell) or
300300
%USERPROFILE% (cmd.exe) environment variable. Any parent directories
301301
should already exist.

0 commit comments

Comments
 (0)