daplapath 2.1.0__py3-none-any.whl → 2.1.2__py3-none-any.whl

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/path.py CHANGED
@@ -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 self.files.loc[
1007
- lambda x: x.str.count(r"\.parquet") == 2
1008
- ].partition_root.drop_duplicates()
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":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: daplapath
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: A pathlib.Path class for dapla
5
5
  License: MIT
6
6
  Author: ort
@@ -0,0 +1,6 @@
1
+ daplapath/__init__.py,sha256=Qdpwhl8y3-i_42-4-KVT-sPQtJqwWRENLFxROZ_rfbU,86
2
+ daplapath/path.py,sha256=CyvzB020_0JYPJyhOqmnX7nuwYaEH275Y_lK9aLnbEI,57275
3
+ daplapath-2.1.2.dist-info/LICENSE.md,sha256=hxspefYgWP3U6OZFhCifqWMI5ksnKzgFxNKgQnG7Ozc,1074
4
+ daplapath-2.1.2.dist-info/METADATA,sha256=nbmBDypfAzqBQIzzgpCjtpT8FWsYy5CwxdV0n75gXUw,14697
5
+ daplapath-2.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ daplapath-2.1.2.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- daplapath/__init__.py,sha256=Qdpwhl8y3-i_42-4-KVT-sPQtJqwWRENLFxROZ_rfbU,86
2
- daplapath/path.py,sha256=B4EU6hPeFOVMo34Li8e-z61IfdXgMHcHNjpSd1so89w,57271
3
- daplapath-2.1.0.dist-info/LICENSE.md,sha256=hxspefYgWP3U6OZFhCifqWMI5ksnKzgFxNKgQnG7Ozc,1074
4
- daplapath-2.1.0.dist-info/METADATA,sha256=3_FKexzVOL2-C5HHVw9rS_jXaB_Qk_mHKaHNT-MCplI,14697
5
- daplapath-2.1.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- daplapath-2.1.0.dist-info/RECORD,,