github snowflakedb/snowpark-python v1.23.0
Release

one day ago

1.23.0 (2024-10-09)

Snowpark Python API Updates

New Features

  • Added the following new functions in snowflake.snowpark.functions:
    • make_interval
  • Added support for using Snowflake Interval constants with Window.range_between() when the order by column is TIMESTAMP or DATE type.
  • Added support for file writes. This feature is currently in private preview.
  • Added thread_id to QueryRecord to track the thread id submitting the query history.
  • Added support for Session.stored_procedure_profiler.

Improvements

Bug Fixes

  • Fixed a bug where registering a stored procedure or UDxF with type hints would give a warning 'NoneType' has no len() when trying to read default values from function.

Snowpark pandas API Updates

New Features

  • Added support for TimedeltaIndex.mean method.
  • Added support for some cases of aggregating Timedelta columns on axis=0 with agg or aggregate.
  • Added support for by, left_by, right_by, left_index, and right_index for pd.merge_asof.
  • Added support for passing parameter include_describe to Session.query_history.
  • Added support for DatetimeIndex.mean and DatetimeIndex.std methods.
  • Added support for Resampler.asfreq, Resampler.indices, Resampler.nunique, and Resampler.quantile.
  • Added support for resample frequency W, ME, YE with closed = "left".
  • Added support for DataFrame.rolling.corr and Series.rolling.corr for pairwise = False and int window.
  • Added support for string time-based window and min_periods = None for Rolling.
  • Added support for DataFrameGroupBy.fillna and SeriesGroupBy.fillna.
  • Added support for constructing Series and DataFrame objects with the lazy Index object as data, index, and columns arguments.
  • Added support for constructing Series and DataFrame objects with index and column values not present in DataFrame/Series data.
  • Added support for pd.read_sas (Uses native pandas for processing).
  • Added support for applying rolling().count() and expanding().count() to Timedelta series and columns.
  • Added support for tz in both pd.date_range and pd.bdate_range.
  • Added support for Series.items.
  • Added support for errors="ignore" in pd.to_datetime.
  • Added support for DataFrame.tz_localize and Series.tz_localize.
  • Added support for DataFrame.tz_convert and Series.tz_convert.
  • Added support for applying Snowpark Python functions (e.g., sin) in Series.map, Series.apply, DataFrame.apply and DataFrame.applymap.

Improvements

  • Improved to_pandas to persist the original timezone offset for TIMESTAMP_TZ type.
  • Improved dtype results for TIMESTAMP_TZ type to show correct timezone offset.
  • Improved dtype results for TIMESTAMP_LTZ type to show correct timezone.
  • Improved error message when passing non-bool value to numeric_only for groupby aggregations.
  • Removed unnecessary warning about sort algorithm in sort_values.
  • Use SCOPED object for internal create temp tables. The SCOPED objects will be stored sproc scoped if created within stored sproc, otherwise will be session scoped, and the object will be automatically cleaned at the end of the scope.
  • Improved warning messages for operations that lead to materialization with inadvertent slowness.
  • Removed unnecessary warning message about convert_dtype in Series.apply.

Bug Fixes

  • Fixed a bug where an Index object created from a Series/DataFrame incorrectly updates the Series/DataFrame's index name after an inplace update has been applied to the original Series/DataFrame.
  • Suppressed an unhelpful SettingWithCopyWarning that sometimes appeared when printing Timedelta columns.
  • Fixed inplace argument for Series objects derived from other Series objects.
  • Fixed a bug where Series.sort_values failed if series name overlapped with index column name.
  • Fixed a bug where transposing a dataframe would map Timedelta index levels to integer column levels.
  • Fixed a bug where Resampler methods on timedelta columns would produce integer results.
  • Fixed a bug where pd.to_numeric() would leave Timedelta inputs as Timedelta instead of converting them to integers.
  • Fixed loc set when setting a single row, or multiple rows, of a DataFrame with a Series value.

Don't miss a new snowpark-python release

NewReleases is sending notifications on new releases.