Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPR: Positional arguments in Series.to_markdown #57372

Merged
merged 8 commits into from
Feb 18, 2024
Merged

DEPR: Positional arguments in Series.to_markdown #57372

merged 8 commits into from
Feb 18, 2024

Conversation

rmhowe425
Copy link
Contributor

@rmhowe425 rmhowe425 commented Feb 12, 2024

@rmhowe425 rmhowe425 changed the title DEPR: Positional arguments in Series.to_markdown/string DEPR: Positional arguments in Series.to_markdown Feb 12, 2024
@simonjayhawkins simonjayhawkins added IO Data IO issues that don't fit into a more specific label Deprecate Functionality to remove in pandas labels Feb 13, 2024
@rmhowe425
Copy link
Contributor Author

@mroeschke Pinging on green

@twoertwein
Copy link
Member

Looks good to me!

If you want to, you can also add overloads that already use the keyword-only syntax:

    @overload
    def to_markdown(
        self,
        buf: None = ...,
        *,
        mode: str = ...,
        index: bool = ...,
        storage_options: StorageOptions | None = ...,
        **kwargs,
    ) -> str: ...

    @overload
    def to_markdown(
        self,
        buf: IO[str],
        *,
        mode: str = ...,
        index: bool = ...,
        storage_options: StorageOptions | None = ...,
        **kwargs,
    ) -> None: ...

    @overload
    def to_markdown(
        self,
        buf: IO[str] | None,
        *,
        mode: str = ...,
        index: bool = ...,
        storage_options: StorageOptions | None = ...,
        **kwargs,
    ) -> str | None: ...

@twoertwein
Copy link
Member

The changes look good to me, but the doc-test is failing (@mroeschke). The doc-test should definitely succeed before merging as the typing tests run after the doc-tests (in case mypy/pyright pick up something).

@twoertwein twoertwein merged commit 2ef7eb3 into pandas-dev:main Feb 18, 2024
45 of 47 checks passed
@twoertwein
Copy link
Member

Thank you @rmhowe425 !

@rmhowe425 rmhowe425 deleted the dev/depr/Series-to-string branch February 18, 2024 22:00
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Updated whatsnew and added deprecation message.

* Adding unit test for deprecation warning.

* Updating unit tests.

* Update series.py

* Updating unit test and documentation.

* Adding in to_markdown overload functions per reviewer feedback.

* Updating implementation based on reviewer feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: Positional arguments in Series.to_markdown/string
3 participants