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
toQueryRecord
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 onaxis=0
withagg
oraggregate
. - Added support for
by
,left_by
,right_by
,left_index
, andright_index
forpd.merge_asof
. - Added support for passing parameter
include_describe
toSession.query_history
. - Added support for
DatetimeIndex.mean
andDatetimeIndex.std
methods. - Added support for
Resampler.asfreq
,Resampler.indices
,Resampler.nunique
, andResampler.quantile
. - Added support for
resample
frequencyW
,ME
,YE
withclosed = "left"
. - Added support for
DataFrame.rolling.corr
andSeries.rolling.corr
forpairwise = False
and intwindow
. - Added support for string time-based
window
andmin_periods = None
forRolling
. - Added support for
DataFrameGroupBy.fillna
andSeriesGroupBy.fillna
. - Added support for constructing
Series
andDataFrame
objects with the lazyIndex
object asdata
,index
, andcolumns
arguments. - Added support for constructing
Series
andDataFrame
objects withindex
andcolumn
values not present inDataFrame
/Series
data
. - Added support for
pd.read_sas
(Uses native pandas for processing). - Added support for applying
rolling().count()
andexpanding().count()
toTimedelta
series and columns. - Added support for
tz
in bothpd.date_range
andpd.bdate_range
. - Added support for
Series.items
. - Added support for
errors="ignore"
inpd.to_datetime
. - Added support for
DataFrame.tz_localize
andSeries.tz_localize
. - Added support for
DataFrame.tz_convert
andSeries.tz_convert
. - Added support for applying Snowpark Python functions (e.g.,
sin
) inSeries.map
,Series.apply
,DataFrame.apply
andDataFrame.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
inSeries.apply
.
Bug Fixes
- Fixed a bug where an
Index
object created from aSeries
/DataFrame
incorrectly updates theSeries
/DataFrame
's index name after an inplace update has been applied to the originalSeries
/DataFrame
. - Suppressed an unhelpful
SettingWithCopyWarning
that sometimes appeared when printingTimedelta
columns. - Fixed
inplace
argument forSeries
objects derived from otherSeries
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 leaveTimedelta
inputs asTimedelta
instead of converting them to integers. - Fixed
loc
set when setting a single row, or multiple rows, of a DataFrame with a Series value.