ialdev-dataman 0.2.5__tar.gz → 0.2.7__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.
Files changed (119) hide show
  1. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/PKG-INFO +5 -5
  2. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/pyproject.toml +6 -5
  3. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/__init__.py +1 -1
  4. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/collect.py +29 -12
  5. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/transtools.py +18 -11
  6. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/README.md +0 -0
  7. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/docs/use_cases.md +0 -0
  8. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/docs/use_cases.py +0 -0
  9. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/__init__.py +0 -0
  10. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/caster.py +0 -0
  11. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/labeled.py +0 -0
  12. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/scan.py +0 -0
  13. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/datacast/transforms.py +0 -0
  14. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/env.py +0 -0
  15. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/factories.py +0 -0
  16. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/models.py +0 -0
  17. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/__init__.py +0 -0
  18. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/__init__.py +0 -0
  19. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/__init__.py +0 -0
  20. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/hacks.py +0 -0
  21. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/old_enums.py +0 -0
  22. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/representers.py +0 -0
  23. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/types.py +0 -0
  24. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/compat/yaml_lib.py +0 -0
  25. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/ext/__init__.py +0 -0
  26. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/ext/semver.py +0 -0
  27. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/ext/versioned_model.py +0 -0
  28. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/main.py +0 -0
  29. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/mixin.py +0 -0
  30. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/model.py +0 -0
  31. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/py.typed +0 -0
  32. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/fixed_pydantic_yaml/version.py +0 -0
  33. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/pydantools/models.py +0 -0
  34. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/src/iad/dataman/resman.py +0 -0
  35. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/conftest.py +0 -0
  36. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/datasets/toy/datasource.yml +0 -0
  37. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/datasource.yml +0 -0
  38. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/FT3D.col.yml +0 -0
  39. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/FT3D.ds.yml +0 -0
  40. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/FT3D.scm.yml +0 -0
  41. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/source_1.src.yml +0 -0
  42. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/source_2.src.yml +0 -0
  43. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/test_FT3D.src.yml +0 -0
  44. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/toy_split.ds.yml +0 -0
  45. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/res/verosnap.scm.yml +0 -0
  46. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/data/scheme.yml +0 -0
  47. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/test_collect.py +0 -0
  48. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datacast/test_scheme.py +0 -0
  49. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/datasets/toy/datasource.yml +0 -0
  50. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/datasource.yml +0 -0
  51. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/FT3D.col.yml +0 -0
  52. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/FT3D.ds.yml +0 -0
  53. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/FT3D.scm.yml +0 -0
  54. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/source_1.src.yml +0 -0
  55. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/source_2.src.yml +0 -0
  56. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/test_FT3D.src.yml +0 -0
  57. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/res/toy_split.ds.yml +0 -0
  58. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/data/scheme.yml +0 -0
  59. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/test_datasets.py +0 -0
  60. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/datasets/test_models.py +0 -0
  61. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/data/dump.json +0 -0
  62. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/data/dump.yaml +0 -0
  63. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/data/example_yaml.yml +0 -0
  64. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/__init__.py +0 -0
  65. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/recursive.yaml +0 -0
  66. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_advanced_yaml.py +0 -0
  67. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_basic.py +0 -0
  68. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_io.py +0 -0
  69. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_resursive.py +0 -0
  70. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_secret_types.py +0 -0
  71. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_sorting.py +0 -0
  72. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_types.py +0 -0
  73. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/test_versioned.py +0 -0
  74. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/fixed_pydantic_yaml/versioned.yaml +0 -0
  75. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/pydantools/test_models.py +0 -0
  76. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/resman/data/res/nested/wind.dply.yml +0 -0
  77. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/resman/data/res/nested/windtwo.dply.yml +0 -0
  78. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/resman/data/res/wind.dply.yml +0 -0
  79. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/resman/test_resource.py +0 -0
  80. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test.env +0 -0
  81. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/StereoImage_1058262900228717.tif +0 -0
  82. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/bench/tiny/metrics_94362.hdf +0 -0
  83. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/evals/tiny/Adirondack##1#1#1/conf#NU40#0.0#6de6#L.tif +0 -0
  84. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/evals/tiny/Adirondack##1#1#1/disp#NU40#0.0#6de6#L.tif +0 -0
  85. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/evals/tiny/Piano##1#1#1/conf#NU40#0.0#6de6#L.tif +0 -0
  86. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/evals/tiny/Piano##1#1#1/disp#NU40#0.0#6de6#L.tif +0 -0
  87. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/calib.txt +0 -0
  88. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/disp0GT.tif +0 -0
  89. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/disp1GT.tif +0 -0
  90. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/im0.jpg +0 -0
  91. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/im0_gray.jpg +0 -0
  92. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/im1.jpg +0 -0
  93. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/im1_gray.jpg +0 -0
  94. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/mask0nocc.jpg +0 -0
  95. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Adirondack/mask1nocc.jpg +0 -0
  96. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/calib.txt +0 -0
  97. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/disp0GT.tif +0 -0
  98. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/disp1GT.tif +0 -0
  99. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/im0.jpg +0 -0
  100. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/im0_gray.jpg +0 -0
  101. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/im1.jpg +0 -0
  102. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/im1_gray.jpg +0 -0
  103. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/mask0nocc.jpg +0 -0
  104. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/Piano/mask1nocc.jpg +0 -0
  105. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/data/tiny_stereo/datasource.yml +0 -0
  106. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/benchmarks/tiny.bmk.yml +0 -0
  107. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/collections/tiny.col.yml +0 -0
  108. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/collections/tiny_2.col.yml +0 -0
  109. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/datasets/tiny.ds.yml +0 -0
  110. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/issues/categorical/issue.xlsx +0 -0
  111. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/issues/selector_issues.csv +0 -0
  112. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/depth/Monkaa_output_from_NU.scm.yml +0 -0
  113. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/depth/labels.yml +0 -0
  114. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/depth/repos/bench_evals.scm.yml +0 -0
  115. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/depth/repos/bench_results.scm.yml +0 -0
  116. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/labels.yml +0 -0
  117. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/schemes/tiny.scm.yml +0 -0
  118. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/trainings/test_training_config.trn.yml +0 -0
  119. {ialdev_dataman-0.2.5 → ialdev_dataman-0.2.7}/tests/test_resources/resources/trainings/test_training_curriculum_config.trn.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ialdev-dataman
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Imported as `iad.dataman` — data casting, resource models, and dataset bridge
5
5
  Author: ipcoder
6
6
  Requires-Python: >=3.10
@@ -12,10 +12,10 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: ialdev-core>=0.2.4
16
- Requires-Dist: ialdev-io>=0.2.2
17
- Requires-Dist: ialdev-img>=0.2.2
18
- Requires-Dist: ialdev-maths>=0.2.3
15
+ Requires-Dist: ialdev-core>=0.2.6
16
+ Requires-Dist: ialdev-io>=0.2.4
17
+ Requires-Dist: ialdev-img>=0.2.4
18
+ Requires-Dist: ialdev-maths>=0.2.5
19
19
  Requires-Dist: pandas>=2.0.0
20
20
  Requires-Dist: numpy>=1.26.4,<2
21
21
  Requires-Dist: pydantic>=2.0
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "ialdev-dataman"
7
- version = "0.2.5"
7
+ version = "0.2.7"
8
8
  description = "Imported as `iad.dataman` — data casting, resource models, and dataset bridge"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -23,10 +23,10 @@ classifiers = [
23
23
  ]
24
24
 
25
25
  dependencies = [
26
- "ialdev-core>=0.2.4",
27
- "ialdev-io>=0.2.2",
28
- "ialdev-img>=0.2.2",
29
- "ialdev-maths>=0.2.3",
26
+ "ialdev-core>=0.2.6",
27
+ "ialdev-io>=0.2.4",
28
+ "ialdev-img>=0.2.4",
29
+ "ialdev-maths>=0.2.5",
30
30
  "pandas>=2.0.0",
31
31
  "numpy>=1.26.4,<2",
32
32
  "pydantic>=2.0",
@@ -51,6 +51,7 @@ name = "iad.dataman"
51
51
 
52
52
  [tool.pytest.ini_options]
53
53
  testpaths = ["tests"]
54
+ addopts = "--import-mode=importlib"
54
55
  python_files = ["test_*.py"]
55
56
  python_classes = ["Test*"]
56
57
  python_functions = ["test_*"]
@@ -4,7 +4,7 @@ from .models import DataSourceRM, SchemeRM, DatasetRM, CollectionRM, DSample, di
4
4
  from .factories import create_caster, create_collection, create_sink
5
5
  from .datacast.collect import DataCollection, SinkRepo
6
6
 
7
- __version__ = "0.2.5"
7
+ __version__ = "0.2.7"
8
8
 
9
9
  __all__ = [
10
10
  "__version__",
@@ -741,24 +741,41 @@ class DataCollection:
741
741
  return trg
742
742
 
743
743
  def qix(self, *args, drop_level: bool = False, trans=False,
744
- axis=None, key_err=True, as_dc=False, **kws) -> CollectTable | DataCollection:
745
- """Fuzzy query of data collection index and return either filtered
746
- version of the data collection (as_dc argument) or
747
- filtered `db` table, optionally in *transformed* formed (data loaded).
748
-
749
- Different query types are supported:
750
- - by
751
-
752
- :param args: list of values from one of the index levels
753
- - will try all until first is found or raise KeyError
744
+ axis=None, key_err=True, reorder=False, as_dc=False, **kws) -> CollectTable | DataCollection:
745
+ """Filter a data collection's index and return either a filtered
746
+ view of the data collection (``as_dc``) or the filtered ``db`` table,
747
+ optionally in *transformed* form (data loaded).
748
+
749
+ Like :meth:`DataTable.qix` this is a FILTER (values match
750
+ zero/one/many rows in storage order); matching is delegated to it
751
+ (see there for the full grammar: named levels, multi-value lists,
752
+ anonymous values, drop_level/keep, and opt-in reorder). For ordered
753
+ one-row-per-label retrieval, prefer ``select``. On top of the filter:
754
+
755
+ 1. Smart query (same as db.qix):
756
+ ``dc.qix(view='cam1')`` / ``dc.qix(view=['cam1','cam2'], reorder=True)``
757
+ 2. Direct index selection - pass a single list/tuple/Index to index
758
+ ``db`` directly (bypasses fuzzy matching; raises if any label misses):
759
+ ``dc.qix([('u1','cam1'), ('u2','cam2')])``
760
+ 3. ``trans=True`` - apply column transforms so data is loaded (e.g.
761
+ images); returns a DataSeries of the data column.
762
+ 4. ``as_dc=True`` (or a name str) - return a new DataCollection
763
+ preserving bundle/history metadata instead of a plain table.
764
+
765
+ ``trans=True`` and ``as_dc=True`` are mutually exclusive (ValueError).
766
+
767
+ :param args: anonymous values, or a single index / list-of-indices
768
+ for direct selection
754
769
  :param drop_level: if True - drop found levels from the result
755
770
  :param trans: if True apply data transforms when producing results
756
771
  :param axis: if specified query only this axis
757
772
  :param key_err: if False ignore key errors
773
+ :param reorder: forward to DataTable.qix (order by listed values;
774
+ raises on duplicates). Default False.
758
775
  :param as_dc: results are returned as a new DataCollection
759
776
  :param kws: {level: value} - eliminates exhaustive search in all levels
760
777
 
761
- :return: Transformed selection's data as DataSeries object.
778
+ :return: filtered db table, DataSeries (trans=True), or DataCollection (as_dc=True).
762
779
  """
763
780
  import pandas as pd
764
781
  # support of usage of direct index instead of smart queries
@@ -773,7 +790,7 @@ class DataCollection:
773
790
  if len(sub) != (len(idx) if isinstance(idx, list) else 1):
774
791
  raise IndexError("Invalid index passed to qix")
775
792
  else: # query based indexing
776
- sub = self.db.qix(*args, drop_level=drop_level, axis=axis, key_err=key_err, **kws)
793
+ sub = self.db.qix(*args, drop_level=drop_level, axis=axis, key_err=key_err, reorder=reorder, **kws)
777
794
 
778
795
  if trans:
779
796
  import pandas as pd
@@ -222,16 +222,20 @@ def apply_column_transform(df: pd.Series | pd.DataFrame, *,
222
222
  except:
223
223
  return fallback(g)
224
224
 
225
- df_out[out] = df_out.apply(func, axis=1)
225
+ # These are deliberate writes into the working frame; suppress the
226
+ # false-positive SettingWithCopyWarning when the caller passed a frame
227
+ # that pandas flags as a copy-of-slice (e.g. a `.qix()`/`.select()` result).
228
+ with pd.option_context('mode.chained_assignment', None):
229
+ df_out.loc[:, out] = df_out.apply(func, axis=1)
226
230
 
227
- if drop is True:
228
- drop = set(inputs) - {out} | {trans}
229
- if drop:
230
- if not inplace:
231
- df.drop(drop, axis=1, inplace=True) # drop used columns in the original df, if returning new df
232
- return df_out.drop(drop, axis=1)
233
- df_out.drop(drop, axis=1, inplace=True) # drop used columns in the inplace df
234
- return df_out
231
+ if drop is True:
232
+ drop = set(inputs) - {out} | {trans}
233
+ if drop:
234
+ if not inplace:
235
+ df.drop(drop, axis=1, inplace=True) # drop used columns in the original df, if returning new df
236
+ return df_out.drop(drop, axis=1)
237
+ df_out.drop(drop, axis=1, inplace=True) # drop used columns in the inplace df
238
+ return df_out
235
239
 
236
240
 
237
241
  def row_func_prepend_transform(fnc: Callable, trans=Col.read_trans, inp=Col.path, out=Col.data):
@@ -533,7 +537,7 @@ class Fetchable:
533
537
  trans_labels = [Col.path, Col.read_trans]
534
538
 
535
539
  if self.empty:
536
- self['data'] = None
540
+ self.loc[:, 'data'] = None
537
541
  return self
538
542
 
539
543
  if not isinstance(self, pd.DataFrame): # Series, must be already with data
@@ -551,7 +555,10 @@ class Fetchable:
551
555
  if reuse or check_file: # change to conditional read if required
552
556
  kws = {'check_file': check_file} | (reuse and {'check_data': reuse} or {})
553
557
  trans = '__cond_trans__'
554
- self[trans] = O(cond_read_trans, **kws)
558
+ # Deliberate write into self (fetch documents in-place data loading);
559
+ # suppress the false-positive copy-of-slice warning.
560
+ with pd.option_context('mode.chained_assignment', None):
561
+ self.loc[:, trans] = O(cond_read_trans, **kws)
555
562
  trans_args = dict(drop=trans, args='series', inp=None) # series with all columns
556
563
  else:
557
564
  trans = Col.read_trans
File without changes