diff --git a/locopy/redshift.py b/locopy/redshift.py index 1575977..ea3b14f 100644 --- a/locopy/redshift.py +++ b/locopy/redshift.py @@ -602,10 +602,7 @@ def insert_dataframe_to_table( logger.info("New table has been created") logger.info("Inserting records...") - - length = len(dataframe) - - for start in range(0, length, batch_size): + for start in range(0, len(dataframe), batch_size): # create a list of tuples for insert to_insert = [] if isinstance(dataframe, pd.DataFrame): diff --git a/pyproject.toml b/pyproject.toml index ba61e5d..6d10c89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = [ { name="Faisal Dosani", email="faisal.dosani@capitalone.com" }, ] license = {text = "Apache Software License"} -dependencies = ["boto3<=1.35.9,>=1.9.92", "PyYAML<=6.0.1,>=5.1", "pandas<=2.2.2,>=0.25.2", "numpy<=2.0.2,>=1.22.0", "polars>=1.0.0"] +dependencies = ["boto3<=1.35.9,>=1.9.92", "PyYAML<=6.0.1,>=5.1", "pandas<=2.2.2,>=0.25.2", "numpy<=2.0.2,>=1.22.0", "polars>=0.20.0"] requires-python = ">=3.9.0" classifiers = [ diff --git a/requirements.txt b/requirements.txt index 71cefc6..3a26156 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile --output-file=requirements.txt pyproject.toml