tdfs4ds 0.2.4.5__py3-none-any.whl → 0.2.4.6__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.
- tdfs4ds/__init__.py +1 -1
- tdfs4ds/utils/info.py +6 -20
- {tdfs4ds-0.2.4.5.dist-info → tdfs4ds-0.2.4.6.dist-info}/METADATA +1 -1
- {tdfs4ds-0.2.4.5.dist-info → tdfs4ds-0.2.4.6.dist-info}/RECORD +6 -6
- {tdfs4ds-0.2.4.5.dist-info → tdfs4ds-0.2.4.6.dist-info}/WHEEL +0 -0
- {tdfs4ds-0.2.4.5.dist-info → tdfs4ds-0.2.4.6.dist-info}/top_level.txt +0 -0
tdfs4ds/__init__.py
CHANGED
tdfs4ds/utils/info.py
CHANGED
|
@@ -247,26 +247,12 @@ def get_feature_types_sql_format(tddf, columns = None):
|
|
|
247
247
|
tddf._DataFrame__execute_node_and_set_table_name(tddf._nodeid, tddf._metaexpr)
|
|
248
248
|
view_name = tddf._table_name # Get the assigned table name
|
|
249
249
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
{
|
|
256
|
-
FROM (
|
|
257
|
-
SEL TOP 1
|
|
258
|
-
{cols_}
|
|
259
|
-
FROM {view_name}
|
|
260
|
-
) A
|
|
261
|
-
RIGHT JOIN (SEL 1 as DUMMY) B
|
|
262
|
-
ON 1=1
|
|
263
|
-
"""
|
|
264
|
-
|
|
265
|
-
# Execute the SQL query and convert the result to a pandas dataframe
|
|
266
|
-
res = tdml.DataFrame.from_query(query).to_pandas()
|
|
267
|
-
|
|
268
|
-
# Return column names with their corresponding SQL data types in a dictionary
|
|
269
|
-
return {c: res[c].values[0].strip() for c in columns}
|
|
250
|
+
sqlalchemy_types = tddf._td_column_names_and_sqlalchemy_types
|
|
251
|
+
sqlalchemy_types = {c:sqlalchemy_types[c.lower()] for c in columns}
|
|
252
|
+
args = {k:tddf[k].cast(v) for k,v in sqlalchemy_types.items()}
|
|
253
|
+
args['drop_columns'] = True
|
|
254
|
+
sql_types = tddf.assign(**args).show_query()
|
|
255
|
+
return {x.split('AS')[3].strip().replace('"',''):x.split('AS')[2].strip()[0:-1] for x in sql_types.split('select')[1].split('from')[0].split(',')}
|
|
270
256
|
|
|
271
257
|
def update_varchar_length(feature_types: dict, new_varchar_length: int) -> dict:
|
|
272
258
|
"""
|
|
@@ -2,7 +2,7 @@ tdfs/__init__.py,sha256=7AcO7uB1opRCt7t2JOHworKimfAaDeO3boRW7u9Geo8,23
|
|
|
2
2
|
tdfs/datasets.py,sha256=-b2MPEKGki2V1M8iUcoDR9uc2krIK7u1CK-EhChvihs,985
|
|
3
3
|
tdfs/feature_store.py,sha256=Honu7eOAXxP4Ivz0mRlhuNkfTDzgZl5HB1WlQUwzcZ0,31354
|
|
4
4
|
tdfs/data/curves.csv,sha256=q0Tm-0yu7VMK4lHvHpgi1LMeRq0lO5gJy2Q17brKbEM,112488
|
|
5
|
-
tdfs4ds/__init__.py,sha256=
|
|
5
|
+
tdfs4ds/__init__.py,sha256=2GwBSbOlFGTe2adcT92dJulz2KSn62z-JVJWoBSGlAI,65844
|
|
6
6
|
tdfs4ds/datasets.py,sha256=LE4Gn0muwdyrIrCrbkE92cnafUML63z1lj5bFIIVzmc,3524
|
|
7
7
|
tdfs4ds/feature_engineering.py,sha256=oVnZ2V_XNGE12LKC_fNfkrWSQZLgtYRmaf8Dispi6S4,7081
|
|
8
8
|
tdfs4ds/feature_store.py,sha256=y-oItPZw6nBkBcGAceaATZbkLPTsvpk0OnpzTxYofDs,68576
|
|
@@ -24,12 +24,12 @@ tdfs4ds/process_store/process_registration_management.py,sha256=F8VlBoL-de98KnkM
|
|
|
24
24
|
tdfs4ds/process_store/process_store_catalog_management.py,sha256=H135RRTYn-pyWIqPVbHpuIyyvsaNrek6b1iPk8avJMI,16088
|
|
25
25
|
tdfs4ds/utils/__init__.py,sha256=-yTMfDLZbQnIRQ64s_bczzT21tDW2A8FZeq9PX5SgFU,168
|
|
26
26
|
tdfs4ds/utils/filter_management.py,sha256=7D47N_hnTSUVOkaV2XuKrlUFMxzWjDsCBvRYsH4lXdU,11073
|
|
27
|
-
tdfs4ds/utils/info.py,sha256=
|
|
27
|
+
tdfs4ds/utils/info.py,sha256=q-g_sC8s2ThKAzw76aGWxlx55X4Av6sFCOZ10n4vceE,12146
|
|
28
28
|
tdfs4ds/utils/lineage.py,sha256=LI-5pG7D8lO3-YFa9qA6CrEackiYugV23_Vz9IpF5xw,28670
|
|
29
29
|
tdfs4ds/utils/query_management.py,sha256=nAcE8QY1GWAKgOtb-ubSfDVcnYbU7Ge8CruVRLoPtmY,6356
|
|
30
30
|
tdfs4ds/utils/time_management.py,sha256=_jbwdyZH4Yr3VzbUrq6X93FpXDCDEdH0iv56vX7j8mA,8446
|
|
31
31
|
tdfs4ds/utils/visualization.py,sha256=5S528KoKzzkrAdCxfy7ecyqKvAXBoibNvHwz_u5ISMs,23167
|
|
32
|
-
tdfs4ds-0.2.4.
|
|
33
|
-
tdfs4ds-0.2.4.
|
|
34
|
-
tdfs4ds-0.2.4.
|
|
35
|
-
tdfs4ds-0.2.4.
|
|
32
|
+
tdfs4ds-0.2.4.6.dist-info/METADATA,sha256=hg6uln06By8K0tIN8CEMPSvk69SUjd50OcrM7QDZOQ8,11944
|
|
33
|
+
tdfs4ds-0.2.4.6.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
|
34
|
+
tdfs4ds-0.2.4.6.dist-info/top_level.txt,sha256=wMyVkMvnBn8RRt1xBveGQxOpWFijPMPkMiE7G2mi8zo,8
|
|
35
|
+
tdfs4ds-0.2.4.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|