mostlyai 0.4.6__tar.gz → 0.4.8__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.
- {mostlyai-0.4.6 → mostlyai-0.4.8}/PKG-INFO +2 -1
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/__init__.py +1 -1
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/utils.py +13 -2
- {mostlyai-0.4.6 → mostlyai-0.4.8}/pyproject.toml +1 -1
- {mostlyai-0.4.6 → mostlyai-0.4.8}/LICENSE +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/README.md +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/api.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/base.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/connectors.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/exceptions.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/generators.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/model.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/naming_conventions.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/shares.py +0 -0
- {mostlyai-0.4.6 → mostlyai-0.4.8}/mostlyai/synthetic_datasets.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.8
|
|
4
4
|
Summary: The official Python client for the MOSTLY AI platform.
|
|
5
5
|
Home-page: https://app.mostly.ai/
|
|
6
6
|
License: Proprietary
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Requires-Dist: httpx (>=0.25.0)
|
|
17
18
|
Requires-Dist: pandas (>=1.5.3,<3.0.0)
|
|
18
19
|
Requires-Dist: pyarrow (>=14.0.0)
|
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Callable, Union, Optional, Any, Literal
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
|
+
import csv
|
|
9
10
|
import rich
|
|
10
11
|
from rich.progress import (
|
|
11
12
|
BarColumn,
|
|
@@ -273,8 +274,18 @@ def _read_table_from_path(path: Union[str, Path]) -> (str, pd.DataFrame):
|
|
|
273
274
|
if fn.lower().endswith((".pqt", ".parquet")):
|
|
274
275
|
df = pd.read_parquet(fn)
|
|
275
276
|
else:
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
delimiter = ","
|
|
278
|
+
if fn.lower().endswith((".csv", ".tsv")):
|
|
279
|
+
try:
|
|
280
|
+
with open(fn) as f:
|
|
281
|
+
header = f.readline()
|
|
282
|
+
sniffer = csv.Sniffer()
|
|
283
|
+
delimiter = sniffer.sniff(header, ",;|\t' :").delimiter
|
|
284
|
+
except csv.Error:
|
|
285
|
+
# happens for example for single column CSV files
|
|
286
|
+
pass
|
|
287
|
+
df = pd.read_csv(fn, low_memory=False, delimiter=delimiter)
|
|
288
|
+
if fn.lower().endswith((".gz", ".gzip", ".bz2")):
|
|
278
289
|
fn = fn.rsplit(".", 1)[0]
|
|
279
290
|
name = Path(fn).stem
|
|
280
291
|
return name, df
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|