BrandonFors/pandas-github-issues huggingface dataset:
BUG: Fix string formatting
State: closed

- [x] closes #52690
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Take over pr #52883.

Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
Thanks @yuanx749 
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 62fb0617137a32914716ae5a5c44b699fef82676
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
git commit -am 'Backport PR #53855: BUG: Fix string formatting'
```

4. Push to a named branch:

```
git push YOURFORK 2.0.x:auto-backport-of-pr-53855-on-2.0.x
```

5. Create a PR against branch 2.0.x, I would have named this PR:

> "Backport PR #53855 on branch 2.0.x (BUG: Fix string formatting)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
DOC: Remove incorrect line "Pass tuple or list to drop on multiple axes." from dropna docs
State: closed

Remove incorrect line "Pass tuple or list to drop on multiple axes." from `dropna` docs, as the ability to drop on multiple axes has been depreciated. 


Labels:

Comments:
If you look at this, there are 353 files changed by this pull request, and there are 223 commits.
That suggests you have proposed something that is out of sync with the repository.
DOC: parameterize "See Also" content in `read_table` and `read_csv` so that only the other function appears
State: closed

- [x] closes #53847
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Note: this was the least invasive way to update it and I think it's probably sufficient. The only duplication introduced would be repeating the "summary" lines for each of the functions. If that were a concern, I would suggest making another update where the docstring string formatting parameters are abstracted away once more by introducing something like this:

Define this function in the file:
```
def _generate_docstring_formatter(func_name: Literal["read_csv", "read_table"]) -> dict:
    func_details = {
        "read_csv": {
            "summary": "Read a comma-separated values (csv) file into DataFrame.",
            "_default_sep": "','",
        },
        "read_table": {
            "summary": "Read general delimited file into DataFrame.",
            "_default_sep": r"'\\t' (tab-stop)",
        }
    }
    see_also_func_name = "read_table" if (func_name == "read_csv") else "read_csv"
    return dict(
        func_name=func_name,
        summary=func_details[func_name]["summary"],
        _default_sep=func_details[func_name]["_default_sep"],
        see_also_func_name=see_also_func_name,
        see_also_func_summary=func_details[see_also_func_name]["summary"],
        storage_options=_shared_docs["storage_options"],
        decompression_options=_shared_docs["decompression_options"]
        % "filepath_or_buffer",
    )
```

Then replace the two `@Appender` decorator calls with these instead:

```
# for read_csv:
@Appender(_doc_read_csv_and_table.format(**_generate_docstring_formatter("read_csv")))

# for read_table:
@Appender(_doc_read_csv_and_table.format(**_generate_docstring_formatter("read_table")))
```

I have tested this and it also works but I was unsure whether it's worthwhile (in the maintainers' view) to make that change to avoid a one-line duplication case. Curious to hear feedback though!

Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
Thanks @tpaxman
REF: remove axis keyword from Manager/Block.shift
State: closed

This adds an assertion to NDFrame.shift that won't be Technically Correct until #53832 is merged.


Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
```
mypy.......................................................................Failed
- hook id: mypy
- duration: 214.27s
- exit code: 1

pandas/core/internals/blocks.py:1492: error: Incompatible return value type (got "List[Block]", expected "List[Self]")  [return-value]
pandas/core/internals/blocks.py:1497: error: List item 0 has incompatible type "Block"; expected "Self"  [list-item]
Found 2 errors in 1 file (checked 1418 source files)

mypy (stubtest)............................................................Failed
- hook id: stubtest
- duration: 122.98s
- exit code: 1

error: not checking stubs due to mypy build errors:
pandas/core/internals/blocks.py:1492: error: Incompatible return value type (got "List[Block]", expected "List[Self]")  [return-value]
pandas/core/internals/blocks.py:1497: error: List item 0 has incompatible type "Block"; expected "Self"  [list-item]
```
rebased+green
Thanks @jbrockmendel
BUG: complex Series/DataFrame display all complex nans as `nan+0j`
State: closed

- [x] Closes #53841
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit)
- [x] *I assume that this does not need a changelog entry b/c previously series/dataframes with complex nans will raise.*

This is a pretty dirty implementation but ATM I cannot think of a better one (b/c I'm afraid of breaking other stuff). Please let me know if there are better ways to do this.


Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string
name: Complex
description: Complex Numbers

Comments:
Thanks @Charlie-XIAO
ENH: Improving Index Page
State: closed

- [✅ ] closes #53840
- [✅] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [✅] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Thanks for the PR, but IMO these changes are not substantial enough to merge. If you're interested in contributing please take a look at issues labeled `good first issue`
DOC: update `read_clipboard` docstring to have proper formatting and all required sections.
State: closed

- [x] closes #53837
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Added code formatting, function and class references, as well as 'see also' and 'examples' sections.

Labels:
name: Docs
name: IO Data
description: IO issues that don't fit into a more specific label

Comments:
Thanks @tpaxman
DOC: Add description to `read_csv` chunksize parameter regarding number of lines in chunk
State: closed

- [x] closes #53835
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Added one sentence to describe the meaning of `chunksize`.

Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
Thanks @tpaxman
DOC: fix inconsistencies in `read_csv` docstring type descriptions
State: closed

- [x] closes #53763
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
Keep them coming @tpaxman
BUG: DataFrame.shift(axis=1) with EADtype
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Following this we can simplify the Manager/Block/EA methods since they will only ever get `axis=0`

Labels:
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
Thanks @jbrockmendel 
Thoughts about deprecating this first? This is not great for Dask for example, since users won't be able to use older versions of dask with the new pandas version since the default for us is None which will raise

cc @jbrockmendel 
No objection to doing this as a deprecation first (i.e. #54818)
DEPR: Remove bytes input for read_excel
State: closed

- [X] closes #53767
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: IO Excel
description: read_excel, to_excel
name: Deprecate
description: Functionality to remove in pandas

Comments:
@rhshadrach Pinging on green!
@rhshadrach Pinging on green again after I pushed the last time!
Thanks again @rmhowe425
TST: Use pytest-localserver instead of making network connections
State: closed

Since we have a lot of CI jobs with unit test that make network connections, it is better if the network connections could be made locally if possible. This PR refactors all tests that make network connections to use `pytest-localserver` instead

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO Network
description: Local or Cloud (AWS, GCS, etc.) IO Issues

Comments:
This broke the env on ARM Mac. pytest local server requires aiosmtpd which isn't available on Mac

Edit: Does anyone have bandwidth to look into it? Otherwise I'd revert this for now
I am OK with revert unless @mroeschke has an objection
Could we just remove pytest localserver from environment.yaml? This plugin helps save a few minutes from CI runtime and having the network rests run locally probably isn't a huge priority
REF: implement PandasArray.pad_or_backfill
State: closed

Goes with (but independent of) #53822 trying to separate out pad_or_backfill from interpolate/fillna.

xref #53621

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
Thanks @jbrockmendel
better cython debugging
State: closed

This is still super buggy but hopefully this gets people a bit closer

Labels:
name: Docs
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
looks like some merge conflicts have crept in - if they're resolved, then can this be merged?
@WillAyd is this something we want to move forward with? Can you fix the conflicts if it is please.
Sorry forgot about this one. Yea I think its only helpful so happy to move forward with it
Thanks for this @WillAyd
DEPR: Deprecate use of un-supported numpy dt64/td64 dtype for pandas.array
State: closed

- [X] closes #53058
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Deprecate
description: Functionality to remove in pandas
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
@jbrockmendel PR is ready for inspection
@jbrockmendel PR has been updated. Pinging on green
@jbrockmendel PR has been updated. Pinging on green
@jbrockmendel PR has been updated. Pinging on green
@jbrockmendel  PR has been updated. Pinging on green
@mroeschke worth nitpicking wording any further?
@mroeschke PR ready for inspection. Looks like unit test `test_indices_concatenation_order` is causing unit tests to fail. Seems to be a known issue.
Thanks @rmhowe425
ENH: Include `df.attrs` metadata in `to_csv` output
State: closed

- [ ] closes #53577
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

This new functionality writes DataFrame metadata stored in df.attrs as header/comment lines at the top of a CSV file.

The `to_csv()` method had a `comment` param added to its call, matching the `read_csv()` method signature
    If this param is set all key/values will be written to the beginning of the CSV file in the following format `[comment][key]:[value]`


There was previous PR for this (#53740) that I closed. I accidentally butchered that previous branch, this is the new PR with a clean, fresh branch

Labels:
name: IO CSV
description: read_csv, to_csv
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
TST: Add test for loc expansion GH13829.
State: closed

- [ ] closes #13829  (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Testing
description: pandas testing functions or related to the test suite

Comments:
Thanks @liang3zy22
REF: separate out cross-merge, make less stateful
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Refactor
description: Internal refactoring of code

Comments:
Just a merge conflict
rebased+green
Thanks @jbrockmendel
DEPR: Remove literal string input for read_xml
State: closed

- [X] closes #53767 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Deprecate
description: Functionality to remove in pandas
name: IO XML
description: read_xml, to_xml

Comments:
@mroeschke PR is ready for review!
@mroeschke Pinging on green! I added multiple checks from common.py rather than just checking for `\n` 😅 
@mroeschke Pinging on green
@mroeschke warning logic moved to `_parse`. Pinging on green
Thanks again @rmhowe425
REF: simplify merge code
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @jbrockmendel
REF: de-duplicate Block.diff, remove axis kwd
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Thanks @jbrockmendel
DEPR: Remove literal string input for read_html
State: closed

- [X] closes #53767
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap
name: Deprecate
description: Functionality to remove in pandas

Comments:
@mroeschke PR is ready for inspection!
@mroeschke PR is ready for inspection.
Thanks @rmhowe425
DOC: Fixing EX01 - Added examples
State: closed

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Towards https://github.com/pandas-dev/pandas/issues/37875



Labels:
name: Docs

Comments:
Looks like some of the code checks are failing
Thanks for the corrections.
@MarcoGorelli - it looks green.