You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on documentation, it accepts parameter path as str. Inside the to_pickle(), the path parameter is put to stringify_path() so it accepts path-like object actually.
Suggested fix for documentation
Adding path-like object to documentation removes warning in PyCharm.
The text was updated successfully, but these errors were encountered:
Inside the to_pickle(), the path parameter is put to stringify_path() so it accepts path-like object actually.
NDFrame.to_pickle dispatches to to_pickle in pandas/io/pickle.py where the accepted types are defined as filepath_or_buffer: FilePath | WriteBuffer[bytes]. (FilePath is defined in pandas._typing as FilePath = Union[str, "PathLike[str]"])
The type annotation for path in DataFrame.to_pickle should match the type annotation for filepath_or_buffer in pandas.io.pickle.to_pickle and should match the docstring too
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.to_pickle.html
Documentation problem
Based on documentation, it accepts parameter path as str. Inside the to_pickle(), the path parameter is put to stringify_path() so it accepts path-like object actually.
Suggested fix for documentation
Adding path-like object to documentation removes warning in PyCharm.

The text was updated successfully, but these errors were encountered: