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

Add pandas-path integration #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add pandas-path integration #135

wants to merge 2 commits into from

Conversation

pjbull
Copy link
Member

@pjbull pjbull commented Mar 15, 2021

  • Adds .cloud accessor to pd.Series and pd.Index via a pandas-path custom accessor
  • Adds simple tests for the integration
  • Adds docs for the integration
  • Updates changelog

@github-actions
Copy link
Contributor

@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #135 (fe6f09f) into master (80b596f) will decrease coverage by 0.1%.
The diff coverage is 66.6%.

@@           Coverage Diff            @@
##           master    #135     +/-   ##
========================================
- Coverage    93.5%   93.4%   -0.2%     
========================================
  Files          21      22      +1     
  Lines        1119    1125      +6     
========================================
+ Hits         1047    1051      +4     
- Misses         72      74      +2     
Impacted Files Coverage Δ
cloudpathlib/pandas/cloud/__init__.py 66.6% <66.6%> (ø)

@@ -12,6 +12,7 @@ mkdocs-material>=7
mkdocstrings>=0.15
mypy
pandas
pandas-path>=0.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if it makes sense to add a pandas extras option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's kind of conceptually nice to have the extras be focused on cloud providers since that's the major differentiator.

pip install pandas-path
```

All you need to do to register the accessor is `from cloudpathlib.pandas import cloud`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra module layer, instead of just import cloudpathlib.pandas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to mirror the the pandas-path import which looks like from pandas_path import path. I think it's nice to (1) make the structure similar, and (2) see the name of the accessor when you do the import so you can see how they might get tied together.

@pjbull
Copy link
Member Author

pjbull commented Mar 20, 2021

@jayqi Let me know if you have thoughts on putting this functionality in cloudpathlib. Now that it is implemented, I could also see this making sense in the pandas-path package rather than here. I don't feel strongly either way.

@jayqi
Copy link
Member

jayqi commented Mar 20, 2021

Yeah, I guess it could go either way:


pip install cloudpathlib[s3]
pip install pandas-path
from cloudpathlib.pandas import cloud

pip install pandas-path[s3]
from pandas_path import cloud

Now that I've seen it, I guess the interface looks cleaner to have this live in pandas-path.

@jayqi
Copy link
Member

jayqi commented Feb 5, 2022

@pjbull the more I've thought about this one, the more that I think having this as an extension within pandas_path makes more sense than including it in cloudpathlib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants