Series¶
Constructor
|
Snowpark pandas representation of pandas.Series with a lazily-evaluated relational dataset. |
Attributes
Get the index for this Series/DataFrame. |
|
Return a list of the row axis labels. |
|
Return the ExtensionArray of the data backing this Series or Index. |
|
Return the dtype object of the underlying data. |
|
Return the dtype object of the underlying data. |
|
|
Indicate duplicate Series values. |
|
Test whether two series contain the same elements. |
Indicator whether the Series is empty. |
|
Return True if there are any NaNs. |
|
Return boolean if values in the object are monotonically increasing. |
|
Return boolean if values in the object are monotonically decreasing. |
|
Return the name of the Series. |
|
Number of dimensions of the underlying data, by definition 1. |
|
Return a tuple of the shape of the underlying data. |
|
Return an int representing the number of elements in this object. |
|
Return the transpose, which is by definition self. |
|
Return a NumPy representation of the dataset. |
Snowflake Specific
|
Save the Snowpark pandas Series as a Snowflake table. |
|
Convert the Snowpark pandas Series to a Snowpark DataFrame. |
|
Persists the current Snowpark pandas Series to a temporary table to improve the latency of subsequent operations. |
Conversion
|
Cast a pandas object to a specified dtype |
|
Convert columns to best possible dtypes using dtypes supporting |
|
Make a copy of this object's indices and data. |
|
Convert Series to {label -> value} dict or dict-like object. |
Return a list of the values. |
|
|
A NumPy ndarray representing the values in this Series or Index. |
|
Convert Snowpark pandas Series to pandas.Series (https://pandas.pydata.org/docs/reference/api/pandas.Series.html) |
|
Return the values as a NumPy array. |
Indexing, iteration
Purely integer-location based indexing for selection by position. |
|
Lazily iterate over (index, value) tuples. |
|
Access a group of rows and columns by label(s) or a boolean array. |
|
Return an iterator of the values. |
|
Return alias for index. |
Binary operator functions
|
Return Addition of series and other, element-wise (binary operator add). |
|
Return Subtraction of series and other, element-wise (binary operator sub). |
|
Get multiplication of BasePandasDataset and other, element-wise (binary operator mul). |
|
Return Floating division of series and other, element-wise (binary operator truediv). |
|
Return Floating division of series and other, element-wise (binary operator truediv). |
|
Return Integer division of series and other, element-wise (binary operator floordiv). |
|
Return Modulo of series and other, element-wise (binary operator mod). |
|
Return Exponential power of series and other, element-wise (binary operator pow). |
|
Return Addition of series and other, element-wise (binary operator radd). |
|
Return Subtraction of series and other, element-wise (binary operator rsub). |
|
Return Multiplication of series and other, element-wise (binary operator rmul). |
|
Return Floating division of series and other, element-wise (binary operator rtruediv). |
|
Return Floating division of series and other, element-wise (binary operator rtruediv). |
|
Return Integer division of series and other, element-wise (binary operator rfloordiv). |
|
Return Modulo of series and other, element-wise (binary operator rmod). |
|
Return Exponential power of series and other, element-wise (binary operator rpow). |
|
Round a BasePandasDataset to a variable number of decimal places. |
|
Return Less than of series and other, element-wise (binary operator lt). |
|
Return Greater than of series and other, element-wise (binary operator gt). |
|
Return Less than or equal to of series and other, element-wise (binary operator le). |
|
Return Greater than or equal to of series and other, element-wise (binary operator ge). |
|
Return Not equal to of series and other, element-wise (binary operator ne). |
|
Return Equal to of series and other, element-wise (binary operator eq). |
Function application, GroupBy & window
|
Invoke function on values of Series. |
|
Aggregate using one or more operations over the specified axis. |
|
Aggregate using one or more operations over the specified axis. |
|
Call |
|
Map values of Series according to an input mapping or function. |
|
Group Series using a mapper or by a Series of columns. |
|
Provide rolling window calculations. |
Computations / descriptive stats
Return a BasePandasDataset with absolute numeric value of each element. |
|
|
Return whether all elements are True, potentially over an axis. |
|
Return whether any element are True, potentially over an axis. |
Return number of non-NA/null observations in the Series. |
|
|
Return cumulative maximum over a BasePandasDataset axis. |
|
Return cumulative minimum over a BasePandasDataset axis. |
|
Return cumulative sum over a BasePandasDataset axis. |
|
Generate descriptive statistics. |
|
First discrete difference of element. |
|
Return the maximum of the values over the requested axis. |
|
Return the mean of the values over the requested axis. |
|
Return the median of the values over the requested axis. |
|
Return the minimum of the values over the requested axis. |
|
Fractional change between the current and a prior element. |
|
Return value at the given quantile. |
|
Compute numerical data ranks (1 through n) along axis. |
|
Return unbiased skew, normalized over n-1 |
|
Return sample standard deviation over requested axis. |
|
Return the sum of the values over the requested axis. |
|
Return unbiased variance over requested axis. |
Return unique values of Series object. |
|
|
Return number of unique elements in the series. |
Return True if values in the Series are unique. |
|
|
Return a Series containing counts of unique values. |
Reindexing / selection / label manipulation
|
Replace values where the conditions are True. |
|
Return Series with specified index labels removed. |
|
Return Series with duplicate values removed. |
|
Get item from object for given key (ex: DataFrame column). |
|
Return the first n rows. |
|
Return the row label of the maximum value. |
|
Return the row label of the minimum value. |
|
Whether elements in BasePandasDataset are contained in values. |
|
Select final periods of time series data based on a date offset. |
|
Alter Series index labels or name. |
|
Set the name of the axis for the index or columns. |
|
Generate a new DataFrame or Series with the index reset. |
|
Return a random sample of items from an axis of object. |
|
Assign desired index to given axis. |
|
Return the elements in the given positional indices along an axis. |
|
Return the last n rows. |
|
Replace values where the condition is False. |
|
Replace values where the condition is True. |
|
Prefix labels with string prefix. |
|
Suffix labels with string suffix. |
Missing data handling
|
Synonym for DataFrame.fillna with |
|
Synonym for DataFrame.fillna with |
|
Return a new Series with missing values removed. |
|
Synonym for |
|
Fill NA/NaN values using the specified method. |
Detect missing values. |
|
Series.isnull is an alias for Series.isna. |
|
Detect non-missing values for an array-like object. |
|
Detect non-missing values for an array-like object. |
|
|
Synonym for |
|
Replace values given in to_replace with value. |
Reshaping, sorting
|
Sort by the values. |
|
Sort object by labels (along an axis). |
|
Unstack, also known as pivot, Series with MultiIndex to produce DataFrame. |
|
Return the largest n elements. |
|
Return the smallest n elements. |
|
Squeeze 1 dimensional axis objects into scalars. |
Combining / comparing / joining / merging
|
Compare to another Series and show the differences. |
|
Modify Series in place using values from passed Series. |
Time Series-related
|
Shift data by desired number of periods and replace columns with fill_value (default: None). |
Return index for first non-NA value or None, if no non-NA value is found. |
|
Return index for last non-NA value or None, if no non-NA value is found. |
|
|
Resample time-series data. |
Accessors
alias of |
|
alias of |
Datetime accessor properties
Returns a series of python |
|
Returns numpy array of datetime.time objects. |
|
Returns a series of the years of the datetime. |
|
Returns a series of the months of the datetime. |
|
Returns a series of the days of the datetime. |
|
Returns a series of the hours of the datetime. |
|
Returns a series of the minutes of the datetime. |
|
Returns a series of the seconds of the datetime. |
|
The microseconds of the datetime. |
|
The nanoseconds of the datetime. |
|
The day of the week with Monday=0, Sunday=6. |
|
The day of the week with Monday=0, Sunday=6. |
|
The day of the week with Monday=0, Sunday=6. |
|
The ordinal day of the year. |
|
The ordinal day of the year. |
|
The number of days in the month. |
|
The number of days in the month. |
|
Returns a series of the quarters of the datetime. |
|
Calculate year, week, and day according to the ISO 8601 standard. |
|
|
Return the month names with specified locale. |
|
Return the day names with specified locale. |
Indicates whether the date is the first day of the month. |
|
Indicates whether the date is the last day of the month. |
|
Indicator for whether the date is the first day of a quarter. |
|
Indicator for whether the date is the last day of a quarter. |
|
Indicate whether the date is the first day of a year. |
|
Indicate whether the date is the last day of the year. |
|
Boolean indicator if the date belongs to a leap year. |
|
|
Perform floor operation on the data to the specified freq. |
|
Perform ceil operation on the data to the specified freq. |
|
Perform round operation on the data to the specified freq. |
|
|
Number of days for each element. |
|
Number of seconds (>= 0 and less than 1 day) for each element. |
|
Number of microseconds (>= 0 and less than 1 second) for each element. |
|
Number of nanoseconds (>= 0 and less than 1 microsecond) for each element. |
|
|
Convert tz-aware Datetime Array/Index from one time zone to another. |
Localize tz-naive Datetime Array/Index to tz-aware Datetime Array/Index. |
String accessor methods
Convert strings in the Series/Index to be capitalized. |
|
|
|
|
Test if pattern or regex is contained within a string of a Series or Index. |
|
Count occurrences of pattern in each string of the Series/Index. |
|
Test if the end of each string element matches a pattern. |
Extract element from each component at specified position or with specified key. |
|
Check whether all characters in each string are digits. |
|
Check whether all characters in each string are lowercase. |
|
Check whether all characters in each string are uppercase. |
|
Check whether all characters in each string are uppercase. |
|
Get the length of a string. |
|
|
Remove leading characters. |
|
Determine if each string starts with a match of a regular expression. |
|
Replace each occurrence of pattern/regex in the Series/Index. |
|
Remove trailing characters. |
|
Slice substrings from each element in the Series or Index. |
|
Split strings around given separator/delimiter. |
|
Test if the start of each string element matches a pattern. |
|
Remove leading and trailing characters. |
|
Map all characters in the string through the given mapping table. |
Serialization / IO / conversion
|
Write object to a comma-separated values (csv) file. |