diff --git a/build/lib/lyzr/data_analyzr/analyzr.py b/build/lib/lyzr/data_analyzr/analyzr.py index 0f8d62b..190093d 100644 --- a/build/lib/lyzr/data_analyzr/analyzr.py +++ b/build/lib/lyzr/data_analyzr/analyzr.py @@ -226,7 +226,7 @@ def _set_logger(self, log_level, print_log): # Optionally, you can set a formatter for the file handler if you want a different format for file logs formatter = logging.Formatter( "%(asctime)s - %(name)s - %(levelname)s\n%(message)s\n", - datefmt="%d-%b-%y %H:%M:%S", + datefmt="%d-%b-%y %H:%M:%S %Z", ) formatter.converter = time.gmtime file_handler.setFormatter(formatter) diff --git a/build/lib/lyzr/data_analyzr/utils.py b/build/lib/lyzr/data_analyzr/utils.py index 740597a..6fa8c05 100644 --- a/build/lib/lyzr/data_analyzr/utils.py +++ b/build/lib/lyzr/data_analyzr/utils.py @@ -43,9 +43,13 @@ def remove_punctuation_from_string(value: str) -> str: def flatten_list(lst: list): + return_lst = [] for el in lst: if isinstance(el, list): - yield from flatten_list(el) + return_lst.extend(flatten_list(el)) + else: + return_lst.append(el) + return return_lst def _remove_punctuation_from_numeric_string(value) -> str: @@ -66,11 +70,9 @@ def convert_to_numeric(df: pd.DataFrame, columns: list[str]) -> pd.DataFrame: for col in columns: try: df = df.dropna(subset=[col]) - df.loc[:, col] = df.loc[:, col].apply( - _remove_punctuation_from_numeric_string - ) - df.loc[:, col] = pd.to_numeric(df.loc[:, col]) - df.loc[:, col] = df.loc[:, col].astype("float") + column_values = df.loc[:, col].apply(remove_punctuation_from_string) + column_values = pd.to_numeric(column_values) + df.loc[:, col] = column_values.astype("float") except Exception: pass return df.infer_objects() diff --git a/dist/lyzr-0.1.36-py3-none-any.whl b/dist/lyzr-0.1.36-py3-none-any.whl deleted file mode 100644 index 5abc0c2..0000000 Binary files a/dist/lyzr-0.1.36-py3-none-any.whl and /dev/null differ diff --git a/dist/lyzr-0.1.36.tar.gz b/dist/lyzr-0.1.36.tar.gz deleted file mode 100644 index 65b3bb5..0000000 Binary files a/dist/lyzr-0.1.36.tar.gz and /dev/null differ diff --git a/dist/lyzr-0.1.37-py3-none-any.whl b/dist/lyzr-0.1.37-py3-none-any.whl new file mode 100644 index 0000000..4bbd511 Binary files /dev/null and b/dist/lyzr-0.1.37-py3-none-any.whl differ diff --git a/dist/lyzr-0.1.37.tar.gz b/dist/lyzr-0.1.37.tar.gz new file mode 100644 index 0000000..91e2be9 Binary files /dev/null and b/dist/lyzr-0.1.37.tar.gz differ diff --git a/lyzr.egg-info/PKG-INFO b/lyzr.egg-info/PKG-INFO index ddc6005..c546b37 100644 --- a/lyzr.egg-info/PKG-INFO +++ b/lyzr.egg-info/PKG-INFO @@ -1,8 +1,11 @@ Metadata-Version: 2.1 Name: lyzr -Version: 0.1.36 -Home-page: +Version: 0.1.37 +Summary: UNKNOWN +Home-page: UNKNOWN Author: lyzr +License: UNKNOWN +Platform: UNKNOWN Classifier: Programming Language :: Python :: 3 Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent @@ -162,3 +165,5 @@ response = chatbot.chat("Your question here") ## License `lyzr` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license. + + diff --git a/lyzr.egg-info/requires.txt b/lyzr.egg-info/requires.txt index e07074e..b41538e 100644 --- a/lyzr.egg-info/requires.txt +++ b/lyzr.egg-info/requires.txt @@ -1,24 +1,24 @@ asyncio -nest_asyncio -openai==1.3.4 +beautifulsoup4==4.12.2 +langchain==0.0.339 litellm==1.2.0 llama-index==0.9.4 -langchain==0.0.339 -python-dotenv>=1.0.0 -beautifulsoup4==4.12.2 -pandas==2.0.2 -weaviate-client==3.25.3 llmsherpa matplotlib==3.8.2 +nest_asyncio +openai==1.3.4 +pandas==2.0.2 +python-dotenv>=1.0.0 +weaviate-client==3.25.3 [data-analyzr] -scikit-learn==1.4.0 -statsmodels==0.14.1 chromadb==0.4.22 -tabulate==0.9.0 -pmdarima==2.0.4 -openpyxl==3.1.2 -redshift_connector==2.0.918 mysql-connector-python==8.2.0 +openpyxl==3.1.2 +pmdarima==2.0.4 psycopg2-binary==2.9.9 +redshift_connector==2.0.918 +scikit-learn==1.4.0 snowflake-connector-python==3.6.0 +statsmodels==0.14.1 +tabulate==0.9.0 diff --git a/lyzr/data_analyzr/analyzr.py b/lyzr/data_analyzr/analyzr.py index 0f8d62b..190093d 100644 --- a/lyzr/data_analyzr/analyzr.py +++ b/lyzr/data_analyzr/analyzr.py @@ -226,7 +226,7 @@ def _set_logger(self, log_level, print_log): # Optionally, you can set a formatter for the file handler if you want a different format for file logs formatter = logging.Formatter( "%(asctime)s - %(name)s - %(levelname)s\n%(message)s\n", - datefmt="%d-%b-%y %H:%M:%S", + datefmt="%d-%b-%y %H:%M:%S %Z", ) formatter.converter = time.gmtime file_handler.setFormatter(formatter) diff --git a/lyzr/data_analyzr/utils.py b/lyzr/data_analyzr/utils.py index 740597a..6fa8c05 100644 --- a/lyzr/data_analyzr/utils.py +++ b/lyzr/data_analyzr/utils.py @@ -43,9 +43,13 @@ def remove_punctuation_from_string(value: str) -> str: def flatten_list(lst: list): + return_lst = [] for el in lst: if isinstance(el, list): - yield from flatten_list(el) + return_lst.extend(flatten_list(el)) + else: + return_lst.append(el) + return return_lst def _remove_punctuation_from_numeric_string(value) -> str: @@ -66,11 +70,9 @@ def convert_to_numeric(df: pd.DataFrame, columns: list[str]) -> pd.DataFrame: for col in columns: try: df = df.dropna(subset=[col]) - df.loc[:, col] = df.loc[:, col].apply( - _remove_punctuation_from_numeric_string - ) - df.loc[:, col] = pd.to_numeric(df.loc[:, col]) - df.loc[:, col] = df.loc[:, col].astype("float") + column_values = df.loc[:, col].apply(remove_punctuation_from_string) + column_values = pd.to_numeric(column_values) + df.loc[:, col] = column_values.astype("float") except Exception: pass return df.infer_objects() diff --git a/setup.py b/setup.py index fe17073..ff47737 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="lyzr", - version="0.1.36", + version="0.1.37", author="lyzr", description="", long_description=open("README.md").read(),