From a8520c5b9fc6dd825fa25a1c054c4fd882869536 Mon Sep 17 00:00:00 2001 From: earthgecko <96679+earthgecko@users.noreply.github.com> Date: Tue, 24 May 2022 11:45:44 +0100 Subject: [PATCH 1/4] Update README.md It may be helpful to users to inform them that the wrapper uses lowercase Julia booleans rather than Python booleans, that is not made specifically clear anywhere. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 893c1b2..28a5c57 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ See the [PyCall configuration](https://github.com/JuliaPy/PyCall.jl#specifying-t Usage --------- -In general, if ``df`` is a Pandas object (such as a dataframe or series), then the Python command ``df.x(y, w=z)`` becomes ``x(df, y, w=z)`` in Julia. ``df.loc[a,b,c]`` becomes ``loc(df)[a,b,c]`` (same for ``iloc`` and ``ix``). Example: +In general, if ``df`` is a Pandas object (such as a dataframe or series), then the Python command ``df.x(y, w=z)`` becomes ``x(df, y, w=z)`` in Julia. ``df.loc[a,b,c]`` becomes ``loc(df)[a,b,c]`` (same for ``iloc`` and ``ix``). Also note that booleans must be of the lowercase Julia type so ``pd.Series(series, copy=True)`` becomes ``Pandas.Series(series, copy=true)`` Example: ```julia >> using Pandas @@ -132,4 +132,4 @@ Changes to the values(...) array propogate back to the underlying series/datafra Caveats ---------- -Panels-related functions are still unwrapped, as well as a few other obscure functions. Note that even if a function is not wrapped explicitly, it can still be called using various methods from [PyCall](https://github.com/stevengj/PyCall.jl). +Panels-related functions are still unwrapped, as well as a few other obscure functions. Note that even if a function is not wrapped explicitly, it can still be called using various methods from [PyCall](https://github.com/stevengj/PyCall.jl). Note that with PyCall Julia lowercase booleans must also be used. From 9b4a011f7f47e97aecf353c09c6b2ec4fd590c56 Mon Sep 17 00:00:00 2001 From: earthgecko <96679+earthgecko@users.noreply.github.com> Date: Tue, 24 May 2022 11:58:18 +0100 Subject: [PATCH 2/4] Not the only exception --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28a5c57..39ecedd 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Pandas.jl ![CI status](https://github.com/JuliaPy/Pandas.jl/actions/workflows/ci.yml/badge.svg) -This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. One exception is that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing. +This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. The two exception are that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing and Julia's lowercase boolean style is used. Installation -------------- From 8a64cb56b9887db9e803833281a2b449e60df427 Mon Sep 17 00:00:00 2001 From: earthgecko <96679+earthgecko@users.noreply.github.com> Date: Tue, 24 May 2022 11:59:03 +0100 Subject: [PATCH 3/4] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39ecedd..0ae7d96 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Pandas.jl ![CI status](https://github.com/JuliaPy/Pandas.jl/actions/workflows/ci.yml/badge.svg) -This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. The two exception are that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing and Julia's lowercase boolean style is used. +This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. The two exceptions are that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing and Julia's lowercase boolean style is used. Installation -------------- From 8357e0c0d58a85dbebf3d398cec043fba9137d5b Mon Sep 17 00:00:00 2001 From: earthgecko <96679+earthgecko@users.noreply.github.com> Date: Wed, 25 May 2022 09:20:00 +0100 Subject: [PATCH 4/4] Unbloat and reference PyCall usage --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ae7d96..9e55aaa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Pandas.jl ![CI status](https://github.com/JuliaPy/Pandas.jl/actions/workflows/ci.yml/badge.svg) -This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. The two exceptions are that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing and Julia's lowercase boolean style is used. +This package provides a Julia interface to the excellent [Pandas](http://pandas.pydata.org/pandas-docs/stable/) package. It sticks closely to the Pandas API. One exception is that integer-based indexing is automatically converted from Python's 0-based indexing to Julia's 1-based indexing. Installation -------------- @@ -24,7 +24,7 @@ See the [PyCall configuration](https://github.com/JuliaPy/PyCall.jl#specifying-t Usage --------- -In general, if ``df`` is a Pandas object (such as a dataframe or series), then the Python command ``df.x(y, w=z)`` becomes ``x(df, y, w=z)`` in Julia. ``df.loc[a,b,c]`` becomes ``loc(df)[a,b,c]`` (same for ``iloc`` and ``ix``). Also note that booleans must be of the lowercase Julia type so ``pd.Series(series, copy=True)`` becomes ``Pandas.Series(series, copy=true)`` Example: +In general, if ``df`` is a Pandas object (such as a dataframe or series), then the Python command ``df.x(y, w=z)`` becomes ``x(df, y, w=z)`` in Julia. ``df.loc[a,b,c]`` becomes ``loc(df)[a,b,c]`` (same for ``iloc`` and ``ix``). Also note that Julia syntax for types must be used in arguments, so ``pd.Series(series, copy=True)`` becomes ``Pandas.Series(series, copy=true)`` Example: ```julia >> using Pandas @@ -94,6 +94,10 @@ age >> plot(df3) ``` +#### API method arguments + +The values accepted by the API of this package generally go through the same conversion as arguments passed to PyCall, see [PyCall - Usage](https://github.com/JuliaPy/PyCall.jl#usage) + Input/Output ------------- Example: @@ -132,4 +136,4 @@ Changes to the values(...) array propogate back to the underlying series/datafra Caveats ---------- -Panels-related functions are still unwrapped, as well as a few other obscure functions. Note that even if a function is not wrapped explicitly, it can still be called using various methods from [PyCall](https://github.com/stevengj/PyCall.jl). Note that with PyCall Julia lowercase booleans must also be used. +Panels-related functions are still unwrapped, as well as a few other obscure functions. Note that even if a function is not wrapped explicitly, it can still be called using various methods from [PyCall](https://github.com/stevengj/PyCall.jl).