sqlframe 3.12.0__py3-none-any.whl → 3.13.1__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.
- sqlframe/_version.py +2 -2
- sqlframe/base/dataframe.py +8 -6
- {sqlframe-3.12.0.dist-info → sqlframe-3.13.1.dist-info}/METADATA +35 -39
- {sqlframe-3.12.0.dist-info → sqlframe-3.13.1.dist-info}/RECORD +7 -7
- {sqlframe-3.12.0.dist-info → sqlframe-3.13.1.dist-info}/WHEEL +1 -1
- {sqlframe-3.12.0.dist-info → sqlframe-3.13.1.dist-info}/LICENSE +0 -0
- {sqlframe-3.12.0.dist-info → sqlframe-3.13.1.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
sqlframe/base/dataframe.py
CHANGED
|
@@ -806,6 +806,8 @@ class BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
806
806
|
)
|
|
807
807
|
else:
|
|
808
808
|
col = self._ensure_and_normalize_col(column)
|
|
809
|
+
if isinstance(col.expression, exp.Alias):
|
|
810
|
+
col.expression = col.expression.this
|
|
809
811
|
return self.copy(expression=self.expression.where(col.expression))
|
|
810
812
|
|
|
811
813
|
filter = where
|
|
@@ -1018,9 +1020,9 @@ class BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
1018
1020
|
elif not isinstance(ascending, list):
|
|
1019
1021
|
ascending = [ascending] * len(columns)
|
|
1020
1022
|
ascending = [bool(x) for i, x in enumerate(ascending)]
|
|
1021
|
-
assert len(columns) == len(
|
|
1022
|
-
ascending
|
|
1023
|
-
)
|
|
1023
|
+
assert len(columns) == len(ascending), (
|
|
1024
|
+
"The length of items in ascending must equal the number of columns provided"
|
|
1025
|
+
)
|
|
1024
1026
|
col_and_ascending = list(zip(columns, ascending))
|
|
1025
1027
|
order_by_columns = [
|
|
1026
1028
|
(
|
|
@@ -1282,9 +1284,9 @@ class BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
1282
1284
|
new_values = list(to_replace.values())
|
|
1283
1285
|
elif not old_values and isinstance(to_replace, list):
|
|
1284
1286
|
assert isinstance(value, list), "value must be a list since the replacements are a list"
|
|
1285
|
-
assert len(to_replace) == len(
|
|
1286
|
-
|
|
1287
|
-
)
|
|
1287
|
+
assert len(to_replace) == len(value), (
|
|
1288
|
+
"the replacements and values must be the same length"
|
|
1289
|
+
)
|
|
1288
1290
|
old_values = to_replace
|
|
1289
1291
|
new_values = value
|
|
1290
1292
|
else:
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sqlframe
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.13.1
|
|
4
4
|
Summary: Turning PySpark Into a Universal DataFrame API
|
|
5
5
|
Home-page: https://github.com/eakmanrq/sqlframe
|
|
6
6
|
Author: Ryan Eakman
|
|
7
7
|
Author-email: eakmanrq@gmail.com
|
|
8
8
|
License: MIT
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
10
|
Classifier: Intended Audience :: Developers
|
|
12
11
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -14,56 +13,55 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
14
13
|
Classifier: Operating System :: OS Independent
|
|
15
14
|
Classifier: Programming Language :: SQL
|
|
16
15
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.9
|
|
18
17
|
Description-Content-Type: text/markdown
|
|
19
18
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: prettytable
|
|
21
|
-
Requires-Dist: sqlglot
|
|
22
|
-
Requires-Dist: typing-extensions
|
|
19
|
+
Requires-Dist: prettytable <4
|
|
20
|
+
Requires-Dist: sqlglot <26.1,>=24.0.0
|
|
21
|
+
Requires-Dist: typing-extensions
|
|
23
22
|
Provides-Extra: bigquery
|
|
24
|
-
Requires-Dist: google-cloud-bigquery-storage
|
|
25
|
-
Requires-Dist: google-cloud-bigquery[pandas]
|
|
23
|
+
Requires-Dist: google-cloud-bigquery-storage <3,>=2 ; extra == 'bigquery'
|
|
24
|
+
Requires-Dist: google-cloud-bigquery[pandas] <4,>=3 ; extra == 'bigquery'
|
|
26
25
|
Provides-Extra: databricks
|
|
27
|
-
Requires-Dist: databricks-sql-connector
|
|
26
|
+
Requires-Dist: databricks-sql-connector <4,>=3.6 ; extra == 'databricks'
|
|
28
27
|
Provides-Extra: dev
|
|
29
|
-
Requires-Dist: duckdb
|
|
30
|
-
Requires-Dist: findspark
|
|
31
|
-
Requires-Dist: mypy
|
|
32
|
-
Requires-Dist: openai
|
|
33
|
-
Requires-Dist: pandas-stubs
|
|
34
|
-
Requires-Dist: pandas
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: duckdb <1.2,>=0.9 ; extra == 'dev'
|
|
29
|
+
Requires-Dist: findspark <3,>=2 ; extra == 'dev'
|
|
30
|
+
Requires-Dist: mypy <1.15,>=1.10.0 ; extra == 'dev'
|
|
31
|
+
Requires-Dist: openai <2,>=1.30 ; extra == 'dev'
|
|
32
|
+
Requires-Dist: pandas-stubs <3,>=2 ; extra == 'dev'
|
|
33
|
+
Requires-Dist: pandas <3,>=2 ; extra == 'dev'
|
|
34
|
+
Requires-Dist: pre-commit <5,>=3.7 ; extra == 'dev'
|
|
35
|
+
Requires-Dist: psycopg <4,>=3.1 ; extra == 'dev'
|
|
36
|
+
Requires-Dist: pyarrow <19,>=10 ; extra == 'dev'
|
|
37
|
+
Requires-Dist: pyspark <3.6,>=2 ; extra == 'dev'
|
|
38
38
|
Requires-Dist: pytest-forked ; extra == 'dev'
|
|
39
|
-
Requires-Dist: pytest-postgresql
|
|
40
|
-
Requires-Dist: pytest-xdist
|
|
41
|
-
Requires-Dist: pytest
|
|
42
|
-
Requires-Dist: ruff
|
|
43
|
-
Requires-Dist: types-psycopg2
|
|
44
|
-
Requires-Dist: pre-commit (>=3.5) ; (python_version == "3.8") and extra == 'dev'
|
|
45
|
-
Requires-Dist: pre-commit (<4.1,>=3.7) ; (python_version >= "3.9") and extra == 'dev'
|
|
39
|
+
Requires-Dist: pytest-postgresql <7,>=6 ; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-xdist <3.7,>=3.6 ; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest <8.4,>=8.2.0 ; extra == 'dev'
|
|
42
|
+
Requires-Dist: ruff <0.10,>=0.4.4 ; extra == 'dev'
|
|
43
|
+
Requires-Dist: types-psycopg2 <3,>=2.9 ; extra == 'dev'
|
|
46
44
|
Provides-Extra: docs
|
|
47
|
-
Requires-Dist: mkdocs-include-markdown-plugin
|
|
48
|
-
Requires-Dist: mkdocs-material-extensions
|
|
49
|
-
Requires-Dist: mkdocs-material
|
|
50
|
-
Requires-Dist: mkdocs
|
|
45
|
+
Requires-Dist: mkdocs-include-markdown-plugin ==6.0.6 ; extra == 'docs'
|
|
46
|
+
Requires-Dist: mkdocs-material-extensions ==1.1.1 ; extra == 'docs'
|
|
47
|
+
Requires-Dist: mkdocs-material ==9.0.5 ; extra == 'docs'
|
|
48
|
+
Requires-Dist: mkdocs ==1.4.2 ; extra == 'docs'
|
|
51
49
|
Requires-Dist: pymdown-extensions ; extra == 'docs'
|
|
52
50
|
Provides-Extra: duckdb
|
|
53
|
-
Requires-Dist: duckdb
|
|
54
|
-
Requires-Dist: pandas
|
|
51
|
+
Requires-Dist: duckdb <1.2,>=0.9 ; extra == 'duckdb'
|
|
52
|
+
Requires-Dist: pandas <3,>=2 ; extra == 'duckdb'
|
|
55
53
|
Provides-Extra: openai
|
|
56
|
-
Requires-Dist: openai
|
|
54
|
+
Requires-Dist: openai <2,>=1.30 ; extra == 'openai'
|
|
57
55
|
Provides-Extra: pandas
|
|
58
|
-
Requires-Dist: pandas
|
|
56
|
+
Requires-Dist: pandas <3,>=2 ; extra == 'pandas'
|
|
59
57
|
Provides-Extra: postgres
|
|
60
|
-
Requires-Dist: psycopg2
|
|
58
|
+
Requires-Dist: psycopg2 <3,>=2.8 ; extra == 'postgres'
|
|
61
59
|
Provides-Extra: redshift
|
|
62
|
-
Requires-Dist: redshift-connector
|
|
60
|
+
Requires-Dist: redshift-connector <2.2.0,>=2.1.1 ; extra == 'redshift'
|
|
63
61
|
Provides-Extra: snowflake
|
|
64
|
-
Requires-Dist: snowflake-connector-python[secure-local-storage]
|
|
62
|
+
Requires-Dist: snowflake-connector-python[secure-local-storage] <3.13,>=3.10.0 ; extra == 'snowflake'
|
|
65
63
|
Provides-Extra: spark
|
|
66
|
-
Requires-Dist: pyspark
|
|
64
|
+
Requires-Dist: pyspark <3.6,>=2 ; extra == 'spark'
|
|
67
65
|
|
|
68
66
|
<div align="center">
|
|
69
67
|
<img src="https://sqlframe.readthedocs.io/en/stable/docs/images/sqlframe_logo.png" alt="SQLFrame Logo" width="400"/>
|
|
@@ -228,5 +226,3 @@ LIMIT 5
|
|
|
228
226
|
| 1975 | 868,985 | 10.92 |
|
|
229
227
|
+------+---------------------------+----------------+
|
|
230
228
|
```
|
|
231
|
-
|
|
232
|
-
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
sqlframe/__init__.py,sha256=wfqm98eLoLid9oV_FzzpG5loKC6LxOhj2lXpfN7SARo,3138
|
|
2
|
-
sqlframe/_version.py,sha256=
|
|
2
|
+
sqlframe/_version.py,sha256=fmajg3X8ZdOn-UpUewARwK5cfYf4wP4Xa0DcHjigFYo,413
|
|
3
3
|
sqlframe/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
sqlframe/base/_typing.py,sha256=b2clI5HI1zEZKB_3Msx3FeAJQyft44ubUifJwQRVXyQ,1298
|
|
5
5
|
sqlframe/base/catalog.py,sha256=SzFQalTWdhWzxUY-4ut1f9TfOECp_JmJEgNPfrRKCe0,38457
|
|
6
6
|
sqlframe/base/column.py,sha256=wRghgieYAA51aw4WuFQWOvl0TFOToZbBhBuIamEzxx4,18011
|
|
7
|
-
sqlframe/base/dataframe.py,sha256=
|
|
7
|
+
sqlframe/base/dataframe.py,sha256=skfzyQt8e5_QOtZ3EHzPd5RqnDbQI7HJDk9VPyQk5gI,74555
|
|
8
8
|
sqlframe/base/decorators.py,sha256=P56cgs8DANxGRIwVs5uOMnDy-BlXZZYMbf4fdnkpWPI,1889
|
|
9
9
|
sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
|
|
10
10
|
sqlframe/base/function_alternatives.py,sha256=8kDCh1cOXtdCcBPYBQ8byXxRAZvphS9N8GDs4txBzGg,52544
|
|
@@ -119,8 +119,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
|
|
|
119
119
|
sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
|
|
120
120
|
sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
|
|
121
121
|
sqlframe/testing/utils.py,sha256=PFsGZpwNUE_4-g_f43_vstTqsK0AQ2lBneb5Eb6NkFo,13008
|
|
122
|
-
sqlframe-3.
|
|
123
|
-
sqlframe-3.
|
|
124
|
-
sqlframe-3.
|
|
125
|
-
sqlframe-3.
|
|
126
|
-
sqlframe-3.
|
|
122
|
+
sqlframe-3.13.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
|
123
|
+
sqlframe-3.13.1.dist-info/METADATA,sha256=zvhNqhunI1QLopG1fc8kn9KlZA_YnlWE0WUJX8v1gi4,8970
|
|
124
|
+
sqlframe-3.13.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
125
|
+
sqlframe-3.13.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
|
126
|
+
sqlframe-3.13.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|