fast-csv-loader 2.0.0__tar.gz → 2.1.0__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.
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/PKG-INFO +10 -3
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/fast_csv_loader/csv_loader.py +7 -1
- fast_csv_loader-2.1.0/pyproject.toml +37 -0
- fast_csv_loader-2.0.0/pyproject.toml +0 -36
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/.gitignore +0 -0
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/LICENSE +0 -0
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/README.md +0 -0
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/fast_csv_loader/__init__.py +0 -0
- {fast_csv_loader-2.0.0 → fast_csv_loader-2.1.0}/requirements.txt +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2.
|
|
2
|
+
Name: fast-csv-loader
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A fast and memory efficient way to load large CSV files (Timeseries data) into Pandas
|
|
5
|
-
Project-URL: Homepage, https://github.com/BennyThadikaran/fast_csv_loader
|
|
6
5
|
Project-URL: Bug Tracker, https://github.com/BennyThadikaran/fast_csv_loader/issues
|
|
6
|
+
Project-URL: Homepage, https://github.com/BennyThadikaran/fast_csv_loader
|
|
7
7
|
Author: Benny Thadikaran
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Keywords: csv-loader,csv-reader,memory-efficient,pandas-dataframe,python3
|
|
@@ -12,6 +12,13 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
|
12
12
|
Classifier: Natural Language :: English
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
23
|
Requires-Python: >=3.8
|
|
17
24
|
Requires-Dist: pandas<3,>=2
|
|
@@ -2,7 +2,7 @@ import io
|
|
|
2
2
|
import os
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import Optional
|
|
5
|
+
from typing import Optional, List
|
|
6
6
|
|
|
7
7
|
import pandas as pd
|
|
8
8
|
|
|
@@ -12,6 +12,7 @@ def csv_loader(
|
|
|
12
12
|
period: int = 160,
|
|
13
13
|
end_date: Optional[datetime] = None,
|
|
14
14
|
date_format: Optional[str] = None,
|
|
15
|
+
use_columns: Optional[List[str]] = None,
|
|
15
16
|
chunk_size: int = 1024 * 6,
|
|
16
17
|
) -> pd.DataFrame:
|
|
17
18
|
"""
|
|
@@ -34,6 +35,9 @@ def csv_loader(
|
|
|
34
35
|
:param date_format: Custom date format in case pandas is unable to parse the date column.
|
|
35
36
|
:type date_format: Optional[str]
|
|
36
37
|
|
|
38
|
+
:param use_columns: Default None. List of column names to load from the CSV file. If None, all columns are loaded.
|
|
39
|
+
:type use_columns: Optional[List[str]]
|
|
40
|
+
|
|
37
41
|
:param chunk_size: The size of data chunks loaded into memory.
|
|
38
42
|
The default is 6144 bytes (6 KB).
|
|
39
43
|
:type chunk_size: int
|
|
@@ -75,6 +79,7 @@ def csv_loader(
|
|
|
75
79
|
index_col=[0],
|
|
76
80
|
parse_dates=[0],
|
|
77
81
|
date_format=date_format,
|
|
82
|
+
usecols=pd.Index(use_columns) if use_columns else None,
|
|
78
83
|
)
|
|
79
84
|
|
|
80
85
|
if end_date:
|
|
@@ -194,6 +199,7 @@ def csv_loader(
|
|
|
194
199
|
parse_dates=[0],
|
|
195
200
|
index_col=[0],
|
|
196
201
|
date_format=date_format,
|
|
202
|
+
usecols=pd.Index(use_columns) if use_columns else None,
|
|
197
203
|
)
|
|
198
204
|
|
|
199
205
|
if end_date:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "hatchling.build"
|
|
3
|
+
requires = [ "hatchling" ]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fast-csv-loader"
|
|
7
|
+
version = "2.1.0"
|
|
8
|
+
description = "A fast and memory efficient way to load large CSV files (Timeseries data) into Pandas"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
keywords = [ "csv-loader", "csv-reader", "memory-efficient", "pandas-dataframe", "python3" ]
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Benny Thadikaran" },
|
|
13
|
+
]
|
|
14
|
+
requires-python = ">=3.8"
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
18
|
+
"Natural Language :: English",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Programming Language :: Python :: 3.14",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [ "pandas>=2,<3" ]
|
|
31
|
+
optional-dependencies.docs = [ "furo==2024.8.6", "sphinx==8.1.3" ]
|
|
32
|
+
urls."Bug Tracker" = "https://github.com/BennyThadikaran/fast_csv_loader/issues"
|
|
33
|
+
urls.Homepage = "https://github.com/BennyThadikaran/fast_csv_loader"
|
|
34
|
+
|
|
35
|
+
[tool.hatch]
|
|
36
|
+
build.targets.sdist.exclude = [ "docs", "tests", ".github" ]
|
|
37
|
+
build.targets.wheel.exclude = [ "docs", "tests", ".github" ]
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "fast_csv_loader"
|
|
7
|
-
version = "2.0.0"
|
|
8
|
-
authors = [
|
|
9
|
-
{ name="Benny Thadikaran" },
|
|
10
|
-
]
|
|
11
|
-
description = "A fast and memory efficient way to load large CSV files (Timeseries data) into Pandas"
|
|
12
|
-
readme = "README.md"
|
|
13
|
-
requires-python = ">=3.8"
|
|
14
|
-
classifiers = [
|
|
15
|
-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
16
|
-
"Operating System :: OS Independent",
|
|
17
|
-
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
-
"Intended Audience :: Developers",
|
|
19
|
-
"Natural Language :: English",
|
|
20
|
-
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
21
|
-
]
|
|
22
|
-
keywords = ["pandas-dataframe", "python3", "memory-efficient", "csv-reader", "csv-loader"]
|
|
23
|
-
dependencies = ["pandas >= 2, <3"]
|
|
24
|
-
|
|
25
|
-
[project.optional-dependencies]
|
|
26
|
-
docs= ["furo==2024.8.6", "Sphinx==8.1.3"]
|
|
27
|
-
|
|
28
|
-
[project.urls]
|
|
29
|
-
"Homepage" = "https://github.com/BennyThadikaran/fast_csv_loader"
|
|
30
|
-
"Bug Tracker" = "https://github.com/BennyThadikaran/fast_csv_loader/issues"
|
|
31
|
-
|
|
32
|
-
[tool.hatch.build.targets.sdist]
|
|
33
|
-
exclude = ["docs", "tests", ".github"]
|
|
34
|
-
|
|
35
|
-
[tool.hatch.build.targets.wheel]
|
|
36
|
-
exclude = ["docs", "tests", ".github"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|