daplapath 2.1.0__tar.gz → 2.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {daplapath-2.1.0 → daplapath-2.1.2}/PKG-INFO +1 -1
- {daplapath-2.1.0 → daplapath-2.1.2}/daplapath/path.py +6 -6
- {daplapath-2.1.0 → daplapath-2.1.2}/pyproject.toml +1 -1
- {daplapath-2.1.0 → daplapath-2.1.2}/LICENSE.md +0 -0
- {daplapath-2.1.0 → daplapath-2.1.2}/README.md +0 -0
- {daplapath-2.1.0 → daplapath-2.1.2}/daplapath/__init__.py +0 -0
|
@@ -729,7 +729,6 @@ class Path(str, _PathBase):
|
|
|
729
729
|
"""File size in terrabytes."""
|
|
730
730
|
return self.kb / 1_000_000_000
|
|
731
731
|
|
|
732
|
-
@property
|
|
733
732
|
def partition_root(self) -> "Path":
|
|
734
733
|
if not self.suffix or self.count(self.suffix) != 2:
|
|
735
734
|
return self
|
|
@@ -997,15 +996,16 @@ class PathSeries(pd.Series, _PathBase):
|
|
|
997
996
|
return self.files.apply(lambda x: x.buckets_path())
|
|
998
997
|
|
|
999
998
|
def partition_root(self, keep: str | None = "last") -> "PathSeries":
|
|
1000
|
-
return self.files.apply(lambda x: x.partition_root)[
|
|
999
|
+
return self.files.apply(lambda x: x.partition_root())[
|
|
1001
1000
|
lambda x: ~x.duplicated(keep=keep)
|
|
1002
1001
|
]
|
|
1003
1002
|
|
|
1004
|
-
@property
|
|
1005
1003
|
def partitioned_files(self) -> "PathSeries":
|
|
1006
|
-
return
|
|
1007
|
-
lambda x: x.str.count(r"\.parquet") == 2
|
|
1008
|
-
|
|
1004
|
+
return (
|
|
1005
|
+
self.files.loc[lambda x: x.str.count(r"\.parquet") == 2]
|
|
1006
|
+
.partition_root()
|
|
1007
|
+
.drop_duplicates()
|
|
1008
|
+
)
|
|
1009
1009
|
|
|
1010
1010
|
@property
|
|
1011
1011
|
def dirs(self) -> "PathSeries":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|