| |
| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <meta charset="utf-8" /> |
| <title>Series — PySpark 3.3.4 documentation</title> |
| |
| <link rel="stylesheet" href="../../_static/css/index.73d71520a4ca3b99cfee5594769eaaae.css"> |
| |
| |
| <link rel="stylesheet" |
| href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css"> |
| <link rel="preload" as="font" type="font/woff2" crossorigin |
| href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2"> |
| <link rel="preload" as="font" type="font/woff2" crossorigin |
| href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2"> |
| |
| |
| |
| <link rel="stylesheet" |
| href="../../_static/vendor/open-sans_all/1.44.1/index.css"> |
| <link rel="stylesheet" |
| href="../../_static/vendor/lato_latin-ext/1.44.1/index.css"> |
| |
| |
| <link rel="stylesheet" href="../../_static/basic.css" type="text/css" /> |
| <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" /> |
| <link rel="stylesheet" type="text/css" href="../../_static/css/pyspark.css" /> |
| |
| <link rel="preload" as="script" href="../../_static/js/index.3da636dd464baa7582d2.js"> |
| |
| <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> |
| <script src="../../_static/jquery.js"></script> |
| <script src="../../_static/underscore.js"></script> |
| <script src="../../_static/doctools.js"></script> |
| <script src="../../_static/language_data.js"></script> |
| <script src="../../_static/clipboard.min.js"></script> |
| <script src="../../_static/copybutton.js"></script> |
| <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script> |
| <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script> |
| <link rel="canonical" href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/series.html" /> |
| <link rel="search" title="Search" href="../../search.html" /> |
| <link rel="next" title="pyspark.pandas.Series" href="api/pyspark.pandas.Series.html" /> |
| <link rel="prev" title="pyspark.pandas.timedelta_range" href="api/pyspark.pandas.timedelta_range.html" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| <meta name="docsearch:language" content="en" /> |
| </head> |
| <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80"> |
| |
| <nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main"> |
| <div class="container-xl"> |
| |
| <a class="navbar-brand" href="../../index.html"> |
| |
| <img src="../../_static/spark-logo-reverse.png" class="logo" alt="logo" /> |
| |
| </a> |
| <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation"> |
| <span class="navbar-toggler-icon"></span> |
| </button> |
| |
| <div id="navbar-menu" class="col-lg-9 collapse navbar-collapse"> |
| <ul id="navbar-main-elements" class="navbar-nav mr-auto"> |
| |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../getting_started/index.html">Getting Started</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../user_guide/index.html">User Guide</a> |
| </li> |
| |
| <li class="nav-item active"> |
| <a class="nav-link" href="../index.html">API Reference</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../development/index.html">Development</a> |
| </li> |
| |
| <li class="nav-item "> |
| <a class="nav-link" href="../../migration_guide/index.html">Migration Guide</a> |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| <ul class="navbar-nav"> |
| |
| |
| </ul> |
| </div> |
| </div> |
| </nav> |
| |
| |
| <div class="container-xl"> |
| <div class="row"> |
| |
| <div class="col-12 col-md-3 bd-sidebar"><form class="bd-search d-flex align-items-center" action="../../search.html" method="get"> |
| <i class="icon fas fa-search"></i> |
| <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" > |
| </form> |
| <nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation"> |
| |
| <div class="bd-toc-item active"> |
| |
| |
| <ul class="nav bd-sidenav"> |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.sql/index.html">Spark SQL</a> |
| </li> |
| |
| |
| |
| |
| <li class="active"> |
| <a href="index.html">Pandas API on Spark</a> |
| <ul> |
| |
| <li class=""> |
| <a href="io.html">Input/Output</a> |
| </li> |
| |
| <li class=""> |
| <a href="general_functions.html">General functions</a> |
| </li> |
| |
| <li class="active"> |
| <a href="">Series</a> |
| </li> |
| |
| <li class=""> |
| <a href="frame.html">DataFrame</a> |
| </li> |
| |
| <li class=""> |
| <a href="indexing.html">Index objects</a> |
| </li> |
| |
| <li class=""> |
| <a href="window.html">Window</a> |
| </li> |
| |
| <li class=""> |
| <a href="groupby.html">GroupBy</a> |
| </li> |
| |
| <li class=""> |
| <a href="ml.html">Machine Learning utilities</a> |
| </li> |
| |
| <li class=""> |
| <a href="extensions.html">Extensions</a> |
| </li> |
| |
| </ul> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.ss/index.html">Structured Streaming</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.ml.html">MLlib (DataFrame-based)</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.streaming.html">Spark Streaming</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.mllib.html">MLlib (RDD-based)</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.html">Spark Core</a> |
| </li> |
| |
| |
| |
| <li class=""> |
| <a href="../pyspark.resource.html">Resource Management</a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| </ul> |
| |
| </nav> |
| </div> |
| |
| |
| |
| <div class="d-none d-xl-block col-xl-2 bd-toc"> |
| |
| <div class="tocsection onthispage pt-5 pb-3"> |
| <i class="fas fa-list"></i> On this page |
| </div> |
| |
| <nav id="bd-toc-nav"> |
| <ul class="nav section-nav flex-column"> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#constructor" class="nav-link">Constructor</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#attributes" class="nav-link">Attributes</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#conversion" class="nav-link">Conversion</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#indexing-iteration" class="nav-link">Indexing, iteration</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#binary-operator-functions" class="nav-link">Binary operator functions</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#function-application-groupby-window" class="nav-link">Function application, GroupBy & Window</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#computations-descriptive-stats" class="nav-link">Computations / Descriptive Stats</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#reindexing-selection-label-manipulation" class="nav-link">Reindexing / Selection / Label manipulation</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#missing-data-handling" class="nav-link">Missing data handling</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#reshaping-sorting-transposing" class="nav-link">Reshaping, sorting, transposing</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#combining-joining-merging" class="nav-link">Combining / joining / merging</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#time-series-related" class="nav-link">Time series-related</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#spark-related" class="nav-link">Spark-related</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#accessors" class="nav-link">Accessors</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#date-time-handling" class="nav-link">Date Time Handling</a><ul class="nav section-nav flex-column"> |
| |
| <li class="nav-item toc-entry toc-h3"> |
| <a href="#datetime-properties" class="nav-link">Datetime Properties</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h3"> |
| <a href="#datetime-methods" class="nav-link">Datetime Methods</a> |
| </li> |
| |
| </ul> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#string-handling" class="nav-link">String Handling</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#categorical-accessor" class="nav-link">Categorical accessor</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#plotting" class="nav-link">Plotting</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#serialization-io-conversion" class="nav-link">Serialization / IO / Conversion</a> |
| </li> |
| |
| <li class="nav-item toc-entry toc-h2"> |
| <a href="#pandas-on-spark-specific" class="nav-link">Pandas-on-Spark specific</a> |
| </li> |
| |
| </ul> |
| </nav> |
| |
| |
| |
| </div> |
| |
| |
| |
| <main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main"> |
| |
| <div> |
| |
| <div class="section" id="series"> |
| <span id="api-series"></span><h1>Series<a class="headerlink" href="#series" title="Permalink to this headline">¶</a></h1> |
| <div class="section" id="constructor"> |
| <h2>Constructor<a class="headerlink" href="#constructor" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.html#pyspark.pandas.Series" title="pyspark.pandas.Series"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series</span></code></a>([data, index, dtype, name, copy, …])</p></td> |
| <td><p>pandas-on-Spark Series that corresponds to pandas Series logically.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="attributes"> |
| <h2>Attributes<a class="headerlink" href="#attributes" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.index.html#pyspark.pandas.Series.index" title="pyspark.pandas.Series.index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.index</span></code></a></p></td> |
| <td><p>The index (axis labels) Column of the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dtype.html#pyspark.pandas.Series.dtype" title="pyspark.pandas.Series.dtype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dtype</span></code></a></p></td> |
| <td><p>Return the dtype object of the underlying data.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dtypes.html#pyspark.pandas.Series.dtypes" title="pyspark.pandas.Series.dtypes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dtypes</span></code></a></p></td> |
| <td><p>Return the dtype object of the underlying data.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.ndim.html#pyspark.pandas.Series.ndim" title="pyspark.pandas.Series.ndim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.ndim</span></code></a></p></td> |
| <td><p>Return an int representing the number of array dimensions.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.name.html#pyspark.pandas.Series.name" title="pyspark.pandas.Series.name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.name</span></code></a></p></td> |
| <td><p>Return name of the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.shape.html#pyspark.pandas.Series.shape" title="pyspark.pandas.Series.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.shape</span></code></a></p></td> |
| <td><p>Return a tuple of the shape of the underlying data.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.axes.html#pyspark.pandas.Series.axes" title="pyspark.pandas.Series.axes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.axes</span></code></a></p></td> |
| <td><p>Return a list of the row axis labels.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.size.html#pyspark.pandas.Series.size" title="pyspark.pandas.Series.size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.size</span></code></a></p></td> |
| <td><p>Return an int representing the number of elements in this object.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.empty.html#pyspark.pandas.Series.empty" title="pyspark.pandas.Series.empty"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.empty</span></code></a></p></td> |
| <td><p>Returns true if the current object is empty.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.T.html#pyspark.pandas.Series.T" title="pyspark.pandas.Series.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.T</span></code></a></p></td> |
| <td><p>Return the transpose, which is by definition self.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.hasnans.html#pyspark.pandas.Series.hasnans" title="pyspark.pandas.Series.hasnans"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.hasnans</span></code></a></p></td> |
| <td><p>Return True if it has any missing values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.values.html#pyspark.pandas.Series.values" title="pyspark.pandas.Series.values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.values</span></code></a></p></td> |
| <td><p>Return a Numpy representation of the DataFrame or the Series.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="conversion"> |
| <h2>Conversion<a class="headerlink" href="#conversion" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.astype.html#pyspark.pandas.Series.astype" title="pyspark.pandas.Series.astype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.astype</span></code></a>(dtype)</p></td> |
| <td><p>Cast a pandas-on-Spark object to a specified dtype <code class="docutils literal notranslate"><span class="pre">dtype</span></code>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.copy.html#pyspark.pandas.Series.copy" title="pyspark.pandas.Series.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.copy</span></code></a>([deep])</p></td> |
| <td><p>Make a copy of this object’s indices and data.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.bool.html#pyspark.pandas.Series.bool" title="pyspark.pandas.Series.bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.bool</span></code></a>()</p></td> |
| <td><p>Return the bool of a single element in the current object.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="indexing-iteration"> |
| <h2>Indexing, iteration<a class="headerlink" href="#indexing-iteration" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.at.html#pyspark.pandas.Series.at" title="pyspark.pandas.Series.at"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.at</span></code></a></p></td> |
| <td><p>Access a single value for a row/column label pair.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.iat.html#pyspark.pandas.Series.iat" title="pyspark.pandas.Series.iat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.iat</span></code></a></p></td> |
| <td><p>Access a single value for a row/column pair by integer position.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.loc.html#pyspark.pandas.Series.loc" title="pyspark.pandas.Series.loc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.loc</span></code></a></p></td> |
| <td><p>Access a group of rows and columns by label(s) or a boolean Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.iloc.html#pyspark.pandas.Series.iloc" title="pyspark.pandas.Series.iloc"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.iloc</span></code></a></p></td> |
| <td><p>Purely integer-location based indexing for selection by position.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.keys.html#pyspark.pandas.Series.keys" title="pyspark.pandas.Series.keys"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.keys</span></code></a>()</p></td> |
| <td><p>Return alias for index.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pop.html#pyspark.pandas.Series.pop" title="pyspark.pandas.Series.pop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pop</span></code></a>(item)</p></td> |
| <td><p>Return item and drop from series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.items.html#pyspark.pandas.Series.items" title="pyspark.pandas.Series.items"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.items</span></code></a>()</p></td> |
| <td><p>This is an alias of <code class="docutils literal notranslate"><span class="pre">iteritems</span></code>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.iteritems.html#pyspark.pandas.Series.iteritems" title="pyspark.pandas.Series.iteritems"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.iteritems</span></code></a>()</p></td> |
| <td><p>Lazily iterate over (index, value) tuples.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.item.html#pyspark.pandas.Series.item" title="pyspark.pandas.Series.item"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.item</span></code></a>()</p></td> |
| <td><p>Return the first element of the underlying data as a Python scalar.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.xs.html#pyspark.pandas.Series.xs" title="pyspark.pandas.Series.xs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.xs</span></code></a>(key[, level])</p></td> |
| <td><p>Return cross-section from the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.get.html#pyspark.pandas.Series.get" title="pyspark.pandas.Series.get"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.get</span></code></a>(key[, default])</p></td> |
| <td><p>Get item from object for given key (DataFrame column, Panel slice, etc.).</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="binary-operator-functions"> |
| <h2>Binary operator functions<a class="headerlink" href="#binary-operator-functions" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.add.html#pyspark.pandas.Series.add" title="pyspark.pandas.Series.add"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.add</span></code></a>(other)</p></td> |
| <td><p>Return Addition of series and other, element-wise (binary operator <cite>+</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.div.html#pyspark.pandas.Series.div" title="pyspark.pandas.Series.div"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.div</span></code></a>(other)</p></td> |
| <td><p>Return Floating division of series and other, element-wise (binary operator <cite>/</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mul.html#pyspark.pandas.Series.mul" title="pyspark.pandas.Series.mul"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mul</span></code></a>(other)</p></td> |
| <td><p>Return Multiplication of series and other, element-wise (binary operator <cite>*</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.radd.html#pyspark.pandas.Series.radd" title="pyspark.pandas.Series.radd"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.radd</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Addition of series and other, element-wise (binary operator <cite>+</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rdiv.html#pyspark.pandas.Series.rdiv" title="pyspark.pandas.Series.rdiv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rdiv</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Floating division of series and other, element-wise (binary operator <cite>/</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rmul.html#pyspark.pandas.Series.rmul" title="pyspark.pandas.Series.rmul"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rmul</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Multiplication of series and other, element-wise (binary operator <cite>*</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rsub.html#pyspark.pandas.Series.rsub" title="pyspark.pandas.Series.rsub"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rsub</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Subtraction of series and other, element-wise (binary operator <cite>-</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rtruediv.html#pyspark.pandas.Series.rtruediv" title="pyspark.pandas.Series.rtruediv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rtruediv</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Floating division of series and other, element-wise (binary operator <cite>/</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sub.html#pyspark.pandas.Series.sub" title="pyspark.pandas.Series.sub"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sub</span></code></a>(other)</p></td> |
| <td><p>Return Subtraction of series and other, element-wise (binary operator <cite>-</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.truediv.html#pyspark.pandas.Series.truediv" title="pyspark.pandas.Series.truediv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.truediv</span></code></a>(other)</p></td> |
| <td><p>Return Floating division of series and other, element-wise (binary operator <cite>/</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pow.html#pyspark.pandas.Series.pow" title="pyspark.pandas.Series.pow"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pow</span></code></a>(other)</p></td> |
| <td><p>Return Exponential power of series of series and other, element-wise (binary operator <cite>**</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rpow.html#pyspark.pandas.Series.rpow" title="pyspark.pandas.Series.rpow"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rpow</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Exponential power of series and other, element-wise (binary operator <cite>**</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mod.html#pyspark.pandas.Series.mod" title="pyspark.pandas.Series.mod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mod</span></code></a>(other)</p></td> |
| <td><p>Return Modulo of series and other, element-wise (binary operator <cite>%</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rmod.html#pyspark.pandas.Series.rmod" title="pyspark.pandas.Series.rmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rmod</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Modulo of series and other, element-wise (binary operator <cite>%</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.floordiv.html#pyspark.pandas.Series.floordiv" title="pyspark.pandas.Series.floordiv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.floordiv</span></code></a>(other)</p></td> |
| <td><p>Return Integer division of series and other, element-wise (binary operator <cite>//</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rfloordiv.html#pyspark.pandas.Series.rfloordiv" title="pyspark.pandas.Series.rfloordiv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rfloordiv</span></code></a>(other)</p></td> |
| <td><p>Return Reverse Integer division of series and other, element-wise (binary operator <cite>//</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.divmod.html#pyspark.pandas.Series.divmod" title="pyspark.pandas.Series.divmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.divmod</span></code></a>(other)</p></td> |
| <td><p>Return Integer division and modulo of series and other, element-wise (binary operator <cite>divmod</cite>).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rdivmod.html#pyspark.pandas.Series.rdivmod" title="pyspark.pandas.Series.rdivmod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rdivmod</span></code></a>(other)</p></td> |
| <td><p>Return Integer division and modulo of series and other, element-wise (binary operator <cite>rdivmod</cite>).</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.combine_first.html#pyspark.pandas.Series.combine_first" title="pyspark.pandas.Series.combine_first"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.combine_first</span></code></a>(other)</p></td> |
| <td><p>Combine Series values, choosing the calling Series’s values first.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.lt.html#pyspark.pandas.Series.lt" title="pyspark.pandas.Series.lt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.lt</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is less than the other.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.gt.html#pyspark.pandas.Series.gt" title="pyspark.pandas.Series.gt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.gt</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is greater than the other.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.le.html#pyspark.pandas.Series.le" title="pyspark.pandas.Series.le"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.le</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is less than or equal to the other.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.ge.html#pyspark.pandas.Series.ge" title="pyspark.pandas.Series.ge"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.ge</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is greater than or equal to the other.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.ne.html#pyspark.pandas.Series.ne" title="pyspark.pandas.Series.ne"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.ne</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is not equal to the other.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.eq.html#pyspark.pandas.Series.eq" title="pyspark.pandas.Series.eq"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.eq</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is equal to the other.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.product.html#pyspark.pandas.Series.product" title="pyspark.pandas.Series.product"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.product</span></code></a>([axis, numeric_only, min_count])</p></td> |
| <td><p>Return the product of the values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dot.html#pyspark.pandas.Series.dot" title="pyspark.pandas.Series.dot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dot</span></code></a>(other)</p></td> |
| <td><p>Compute the dot product between the Series and the columns of other.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="function-application-groupby-window"> |
| <h2>Function application, GroupBy & Window<a class="headerlink" href="#function-application-groupby-window" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.apply.html#pyspark.pandas.Series.apply" title="pyspark.pandas.Series.apply"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.apply</span></code></a>(func[, args])</p></td> |
| <td><p>Invoke function on values of Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.agg.html#pyspark.pandas.Series.agg" title="pyspark.pandas.Series.agg"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.agg</span></code></a>(func)</p></td> |
| <td><p>Aggregate using one or more operations over the specified axis.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.aggregate.html#pyspark.pandas.Series.aggregate" title="pyspark.pandas.Series.aggregate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.aggregate</span></code></a>(func)</p></td> |
| <td><p>Aggregate using one or more operations over the specified axis.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.transform.html#pyspark.pandas.Series.transform" title="pyspark.pandas.Series.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.transform</span></code></a>(func[, axis])</p></td> |
| <td><p>Call <code class="docutils literal notranslate"><span class="pre">func</span></code> producing the same type as <cite>self</cite> with transformed values and that has the same axis length as input.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.map.html#pyspark.pandas.Series.map" title="pyspark.pandas.Series.map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.map</span></code></a>(arg[, na_action])</p></td> |
| <td><p>Map values of Series according to input correspondence.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.groupby.html#pyspark.pandas.Series.groupby" title="pyspark.pandas.Series.groupby"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.groupby</span></code></a>(by[, axis, as_index, dropna])</p></td> |
| <td><p>Group DataFrame or Series using one or more columns.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rolling.html#pyspark.pandas.Series.rolling" title="pyspark.pandas.Series.rolling"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rolling</span></code></a>(window[, min_periods])</p></td> |
| <td><p>Provide rolling transformations.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.expanding.html#pyspark.pandas.Series.expanding" title="pyspark.pandas.Series.expanding"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.expanding</span></code></a>([min_periods])</p></td> |
| <td><p>Provide expanding transformations.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pipe.html#pyspark.pandas.Series.pipe" title="pyspark.pandas.Series.pipe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pipe</span></code></a>(func, *args, **kwargs)</p></td> |
| <td><p>Apply func(self, *args, **kwargs).</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="computations-descriptive-stats"> |
| <span id="api-series-stats"></span><h2>Computations / Descriptive Stats<a class="headerlink" href="#computations-descriptive-stats" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.abs.html#pyspark.pandas.Series.abs" title="pyspark.pandas.Series.abs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.abs</span></code></a>()</p></td> |
| <td><p>Return a Series/DataFrame with absolute numeric value of each element.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.all.html#pyspark.pandas.Series.all" title="pyspark.pandas.Series.all"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.all</span></code></a>([axis, skipna])</p></td> |
| <td><p>Return whether all elements are True.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.any.html#pyspark.pandas.Series.any" title="pyspark.pandas.Series.any"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.any</span></code></a>([axis])</p></td> |
| <td><p>Return whether any element is True.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.between.html#pyspark.pandas.Series.between" title="pyspark.pandas.Series.between"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.between</span></code></a>(left, right[, inclusive])</p></td> |
| <td><p>Return boolean Series equivalent to left <= series <= right.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.clip.html#pyspark.pandas.Series.clip" title="pyspark.pandas.Series.clip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.clip</span></code></a>([lower, upper])</p></td> |
| <td><p>Trim values at input threshold(s).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.corr.html#pyspark.pandas.Series.corr" title="pyspark.pandas.Series.corr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.corr</span></code></a>(other[, method])</p></td> |
| <td><p>Compute correlation with <cite>other</cite> Series, excluding missing values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.count.html#pyspark.pandas.Series.count" title="pyspark.pandas.Series.count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.count</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Count non-NA cells for each column.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cov.html#pyspark.pandas.Series.cov" title="pyspark.pandas.Series.cov"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cov</span></code></a>(other[, min_periods])</p></td> |
| <td><p>Compute covariance with Series, excluding missing values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cummax.html#pyspark.pandas.Series.cummax" title="pyspark.pandas.Series.cummax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cummax</span></code></a>([skipna])</p></td> |
| <td><p>Return cumulative maximum over a DataFrame or Series axis.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cummin.html#pyspark.pandas.Series.cummin" title="pyspark.pandas.Series.cummin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cummin</span></code></a>([skipna])</p></td> |
| <td><p>Return cumulative minimum over a DataFrame or Series axis.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cumsum.html#pyspark.pandas.Series.cumsum" title="pyspark.pandas.Series.cumsum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cumsum</span></code></a>([skipna])</p></td> |
| <td><p>Return cumulative sum over a DataFrame or Series axis.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cumprod.html#pyspark.pandas.Series.cumprod" title="pyspark.pandas.Series.cumprod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cumprod</span></code></a>([skipna])</p></td> |
| <td><p>Return cumulative product over a DataFrame or Series axis.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.describe.html#pyspark.pandas.Series.describe" title="pyspark.pandas.Series.describe"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.describe</span></code></a>([percentiles])</p></td> |
| <td><p>Generate descriptive statistics that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding <code class="docutils literal notranslate"><span class="pre">NaN</span></code> values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.filter.html#pyspark.pandas.Series.filter" title="pyspark.pandas.Series.filter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.filter</span></code></a>([items, like, regex, axis])</p></td> |
| <td><p>Subset rows or columns of dataframe according to labels in the specified index.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.kurt.html#pyspark.pandas.Series.kurt" title="pyspark.pandas.Series.kurt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.kurt</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return unbiased kurtosis using Fisher’s definition of kurtosis (kurtosis of normal == 0.0).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mad.html#pyspark.pandas.Series.mad" title="pyspark.pandas.Series.mad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mad</span></code></a>()</p></td> |
| <td><p>Return the mean absolute deviation of values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.max.html#pyspark.pandas.Series.max" title="pyspark.pandas.Series.max"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.max</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return the maximum of the values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mean.html#pyspark.pandas.Series.mean" title="pyspark.pandas.Series.mean"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mean</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return the mean of the values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.min.html#pyspark.pandas.Series.min" title="pyspark.pandas.Series.min"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.min</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return the minimum of the values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mode.html#pyspark.pandas.Series.mode" title="pyspark.pandas.Series.mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mode</span></code></a>([dropna])</p></td> |
| <td><p>Return the mode(s) of the dataset.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.nlargest.html#pyspark.pandas.Series.nlargest" title="pyspark.pandas.Series.nlargest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.nlargest</span></code></a>([n])</p></td> |
| <td><p>Return the largest <cite>n</cite> elements.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.nsmallest.html#pyspark.pandas.Series.nsmallest" title="pyspark.pandas.Series.nsmallest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.nsmallest</span></code></a>([n])</p></td> |
| <td><p>Return the smallest <cite>n</cite> elements.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pct_change.html#pyspark.pandas.Series.pct_change" title="pyspark.pandas.Series.pct_change"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pct_change</span></code></a>([periods])</p></td> |
| <td><p>Percentage change between the current and a prior element.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.prod.html#pyspark.pandas.Series.prod" title="pyspark.pandas.Series.prod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.prod</span></code></a>([axis, numeric_only, min_count])</p></td> |
| <td><p>Return the product of the values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.nunique.html#pyspark.pandas.Series.nunique" title="pyspark.pandas.Series.nunique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.nunique</span></code></a>([dropna, approx, rsd])</p></td> |
| <td><p>Return number of unique elements in the object.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.is_unique.html#pyspark.pandas.Series.is_unique" title="pyspark.pandas.Series.is_unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.is_unique</span></code></a></p></td> |
| <td><p>Return boolean if values in the object are unique</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.quantile.html#pyspark.pandas.Series.quantile" title="pyspark.pandas.Series.quantile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.quantile</span></code></a>([q, accuracy])</p></td> |
| <td><p>Return value at the given quantile.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rank.html#pyspark.pandas.Series.rank" title="pyspark.pandas.Series.rank"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rank</span></code></a>([method, ascending])</p></td> |
| <td><p>Compute numerical data ranks (1 through n) along axis.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sem.html#pyspark.pandas.Series.sem" title="pyspark.pandas.Series.sem"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sem</span></code></a>([axis, ddof, numeric_only])</p></td> |
| <td><p>Return unbiased standard error of the mean over requested axis.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.skew.html#pyspark.pandas.Series.skew" title="pyspark.pandas.Series.skew"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.skew</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return unbiased skew normalized by N-1.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.std.html#pyspark.pandas.Series.std" title="pyspark.pandas.Series.std"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.std</span></code></a>([axis, ddof, numeric_only])</p></td> |
| <td><p>Return sample standard deviation.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sum.html#pyspark.pandas.Series.sum" title="pyspark.pandas.Series.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sum</span></code></a>([axis, numeric_only, min_count])</p></td> |
| <td><p>Return the sum of the values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.median.html#pyspark.pandas.Series.median" title="pyspark.pandas.Series.median"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.median</span></code></a>([axis, numeric_only, accuracy])</p></td> |
| <td><p>Return the median of the values for the requested axis.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.var.html#pyspark.pandas.Series.var" title="pyspark.pandas.Series.var"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.var</span></code></a>([axis, ddof, numeric_only])</p></td> |
| <td><p>Return unbiased variance.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.kurtosis.html#pyspark.pandas.Series.kurtosis" title="pyspark.pandas.Series.kurtosis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.kurtosis</span></code></a>([axis, numeric_only])</p></td> |
| <td><p>Return unbiased kurtosis using Fisher’s definition of kurtosis (kurtosis of normal == 0.0).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.unique.html#pyspark.pandas.Series.unique" title="pyspark.pandas.Series.unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.unique</span></code></a>()</p></td> |
| <td><p>Return unique values of Series object.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.value_counts.html#pyspark.pandas.Series.value_counts" title="pyspark.pandas.Series.value_counts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.value_counts</span></code></a>([normalize, sort, …])</p></td> |
| <td><p>Return a Series containing counts of unique values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.round.html#pyspark.pandas.Series.round" title="pyspark.pandas.Series.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.round</span></code></a>([decimals])</p></td> |
| <td><p>Round each value in a Series to the given number of decimals.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.diff.html#pyspark.pandas.Series.diff" title="pyspark.pandas.Series.diff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.diff</span></code></a>([periods])</p></td> |
| <td><p>First discrete difference of element.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.is_monotonic.html#pyspark.pandas.Series.is_monotonic" title="pyspark.pandas.Series.is_monotonic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.is_monotonic</span></code></a></p></td> |
| <td><p>Return boolean if values in the object are monotonically increasing.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.is_monotonic_increasing.html#pyspark.pandas.Series.is_monotonic_increasing" title="pyspark.pandas.Series.is_monotonic_increasing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.is_monotonic_increasing</span></code></a></p></td> |
| <td><p>Return boolean if values in the object are monotonically increasing.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.is_monotonic_decreasing.html#pyspark.pandas.Series.is_monotonic_decreasing" title="pyspark.pandas.Series.is_monotonic_decreasing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.is_monotonic_decreasing</span></code></a></p></td> |
| <td><p>Return boolean if values in the object are monotonically decreasing.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="reindexing-selection-label-manipulation"> |
| <h2>Reindexing / Selection / Label manipulation<a class="headerlink" href="#reindexing-selection-label-manipulation" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.align.html#pyspark.pandas.Series.align" title="pyspark.pandas.Series.align"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.align</span></code></a>(other[, join, axis, copy])</p></td> |
| <td><p>Align two objects on their axes with the specified join method.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.drop.html#pyspark.pandas.Series.drop" title="pyspark.pandas.Series.drop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.drop</span></code></a>([labels, index, level])</p></td> |
| <td><p>Return Series with specified index labels removed.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.droplevel.html#pyspark.pandas.Series.droplevel" title="pyspark.pandas.Series.droplevel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.droplevel</span></code></a>(level)</p></td> |
| <td><p>Return Series with requested index level(s) removed.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.drop_duplicates.html#pyspark.pandas.Series.drop_duplicates" title="pyspark.pandas.Series.drop_duplicates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.drop_duplicates</span></code></a>([keep, inplace])</p></td> |
| <td><p>Return Series with duplicate values removed.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.equals.html#pyspark.pandas.Series.equals" title="pyspark.pandas.Series.equals"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.equals</span></code></a>(other)</p></td> |
| <td><p>Compare if the current value is equal to the other.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.add_prefix.html#pyspark.pandas.Series.add_prefix" title="pyspark.pandas.Series.add_prefix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.add_prefix</span></code></a>(prefix)</p></td> |
| <td><p>Prefix labels with string <cite>prefix</cite>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.add_suffix.html#pyspark.pandas.Series.add_suffix" title="pyspark.pandas.Series.add_suffix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.add_suffix</span></code></a>(suffix)</p></td> |
| <td><p>Suffix labels with string suffix.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.first.html#pyspark.pandas.Series.first" title="pyspark.pandas.Series.first"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.first</span></code></a>(offset)</p></td> |
| <td><p>Select first periods of time series data based on a date offset.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.head.html#pyspark.pandas.Series.head" title="pyspark.pandas.Series.head"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.head</span></code></a>([n])</p></td> |
| <td><p>Return the first n rows.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.idxmax.html#pyspark.pandas.Series.idxmax" title="pyspark.pandas.Series.idxmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.idxmax</span></code></a>([skipna])</p></td> |
| <td><p>Return the row label of the maximum value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.idxmin.html#pyspark.pandas.Series.idxmin" title="pyspark.pandas.Series.idxmin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.idxmin</span></code></a>([skipna])</p></td> |
| <td><p>Return the row label of the minimum value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.isin.html#pyspark.pandas.Series.isin" title="pyspark.pandas.Series.isin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.isin</span></code></a>(values)</p></td> |
| <td><p>Check whether <cite>values</cite> are contained in Series or Index.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.last.html#pyspark.pandas.Series.last" title="pyspark.pandas.Series.last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.last</span></code></a>(offset)</p></td> |
| <td><p>Select final periods of time series data based on a date offset.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rename.html#pyspark.pandas.Series.rename" title="pyspark.pandas.Series.rename"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rename</span></code></a>([index])</p></td> |
| <td><p>Alter Series index labels or name.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.rename_axis.html#pyspark.pandas.Series.rename_axis" title="pyspark.pandas.Series.rename_axis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.rename_axis</span></code></a>([mapper, index, inplace])</p></td> |
| <td><p>Set the name of the axis for the index or columns.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.reindex.html#pyspark.pandas.Series.reindex" title="pyspark.pandas.Series.reindex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.reindex</span></code></a>([index, fill_value])</p></td> |
| <td><p>Conform Series to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.reindex_like.html#pyspark.pandas.Series.reindex_like" title="pyspark.pandas.Series.reindex_like"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.reindex_like</span></code></a>(other)</p></td> |
| <td><p>Return a Series with matching indices as other object.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.reset_index.html#pyspark.pandas.Series.reset_index" title="pyspark.pandas.Series.reset_index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.reset_index</span></code></a>([level, drop, name, inplace])</p></td> |
| <td><p>Generate a new DataFrame or Series with the index reset.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sample.html#pyspark.pandas.Series.sample" title="pyspark.pandas.Series.sample"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sample</span></code></a>([n, frac, replace, random_state])</p></td> |
| <td><p>Return a random sample of items from an axis of object.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.swaplevel.html#pyspark.pandas.Series.swaplevel" title="pyspark.pandas.Series.swaplevel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.swaplevel</span></code></a>([i, j, copy])</p></td> |
| <td><p>Swap levels i and j in a MultiIndex.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.swapaxes.html#pyspark.pandas.Series.swapaxes" title="pyspark.pandas.Series.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.swapaxes</span></code></a>(i, j[, copy])</p></td> |
| <td><p>Interchange axes and swap values axes appropriately.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.take.html#pyspark.pandas.Series.take" title="pyspark.pandas.Series.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.take</span></code></a>(indices)</p></td> |
| <td><p>Return the elements in the given <em>positional</em> indices along an axis.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.tail.html#pyspark.pandas.Series.tail" title="pyspark.pandas.Series.tail"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.tail</span></code></a>([n])</p></td> |
| <td><p>Return the last <cite>n</cite> rows.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.where.html#pyspark.pandas.Series.where" title="pyspark.pandas.Series.where"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.where</span></code></a>(cond[, other])</p></td> |
| <td><p>Replace values where the condition is False.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.mask.html#pyspark.pandas.Series.mask" title="pyspark.pandas.Series.mask"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.mask</span></code></a>(cond[, other])</p></td> |
| <td><p>Replace values where the condition is True.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.truncate.html#pyspark.pandas.Series.truncate" title="pyspark.pandas.Series.truncate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.truncate</span></code></a>([before, after, axis, copy])</p></td> |
| <td><p>Truncate a Series or DataFrame before and after some index value.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="missing-data-handling"> |
| <h2>Missing data handling<a class="headerlink" href="#missing-data-handling" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.backfill.html#pyspark.pandas.Series.backfill" title="pyspark.pandas.Series.backfill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.backfill</span></code></a>([axis, inplace, limit])</p></td> |
| <td><p>Synonym for <cite>DataFrame.fillna()</cite> or <cite>Series.fillna()</cite> with <code class="docutils literal notranslate"><span class="pre">method=`bfill`</span></code>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.bfill.html#pyspark.pandas.Series.bfill" title="pyspark.pandas.Series.bfill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.bfill</span></code></a>([axis, inplace, limit])</p></td> |
| <td><p>Synonym for <cite>DataFrame.fillna()</cite> or <cite>Series.fillna()</cite> with <code class="docutils literal notranslate"><span class="pre">method=`bfill`</span></code>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.isna.html#pyspark.pandas.Series.isna" title="pyspark.pandas.Series.isna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.isna</span></code></a>()</p></td> |
| <td><p>Detect existing (non-missing) values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.isnull.html#pyspark.pandas.Series.isnull" title="pyspark.pandas.Series.isnull"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.isnull</span></code></a>()</p></td> |
| <td><p>Detect existing (non-missing) values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.notna.html#pyspark.pandas.Series.notna" title="pyspark.pandas.Series.notna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.notna</span></code></a>()</p></td> |
| <td><p>Detect existing (non-missing) values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.notnull.html#pyspark.pandas.Series.notnull" title="pyspark.pandas.Series.notnull"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.notnull</span></code></a>()</p></td> |
| <td><p>Detect existing (non-missing) values.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pad.html#pyspark.pandas.Series.pad" title="pyspark.pandas.Series.pad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pad</span></code></a>([axis, inplace, limit])</p></td> |
| <td><p>Synonym for <cite>DataFrame.fillna()</cite> or <cite>Series.fillna()</cite> with <code class="docutils literal notranslate"><span class="pre">method=`ffill`</span></code>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dropna.html#pyspark.pandas.Series.dropna" title="pyspark.pandas.Series.dropna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dropna</span></code></a>([axis, inplace])</p></td> |
| <td><p>Return a new Series with missing values removed.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.fillna.html#pyspark.pandas.Series.fillna" title="pyspark.pandas.Series.fillna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.fillna</span></code></a>([value, method, axis, …])</p></td> |
| <td><p>Fill NA/NaN values.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="reshaping-sorting-transposing"> |
| <h2>Reshaping, sorting, transposing<a class="headerlink" href="#reshaping-sorting-transposing" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.argsort.html#pyspark.pandas.Series.argsort" title="pyspark.pandas.Series.argsort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.argsort</span></code></a>()</p></td> |
| <td><p>Return the integer indices that would sort the Series values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.argmin.html#pyspark.pandas.Series.argmin" title="pyspark.pandas.Series.argmin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.argmin</span></code></a>()</p></td> |
| <td><p>Return int position of the smallest value in the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.argmax.html#pyspark.pandas.Series.argmax" title="pyspark.pandas.Series.argmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.argmax</span></code></a>()</p></td> |
| <td><p>Return int position of the largest value in the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sort_index.html#pyspark.pandas.Series.sort_index" title="pyspark.pandas.Series.sort_index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sort_index</span></code></a>([axis, level, ascending, …])</p></td> |
| <td><p>Sort object by labels (along an axis)</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.sort_values.html#pyspark.pandas.Series.sort_values" title="pyspark.pandas.Series.sort_values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.sort_values</span></code></a>([ascending, inplace, …])</p></td> |
| <td><p>Sort by the values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.unstack.html#pyspark.pandas.Series.unstack" title="pyspark.pandas.Series.unstack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.unstack</span></code></a>([level])</p></td> |
| <td><p>Unstack, a.k.a.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.explode.html#pyspark.pandas.Series.explode" title="pyspark.pandas.Series.explode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.explode</span></code></a>()</p></td> |
| <td><p>Transform each element of a list-like to a row.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.repeat.html#pyspark.pandas.Series.repeat" title="pyspark.pandas.Series.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.repeat</span></code></a>(repeats)</p></td> |
| <td><p>Repeat elements of a Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.squeeze.html#pyspark.pandas.Series.squeeze" title="pyspark.pandas.Series.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.squeeze</span></code></a>([axis])</p></td> |
| <td><p>Squeeze 1 dimensional axis objects into scalars.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.factorize.html#pyspark.pandas.Series.factorize" title="pyspark.pandas.Series.factorize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.factorize</span></code></a>([sort, na_sentinel])</p></td> |
| <td><p>Encode the object as an enumerated type or categorical variable.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="combining-joining-merging"> |
| <h2>Combining / joining / merging<a class="headerlink" href="#combining-joining-merging" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.append.html#pyspark.pandas.Series.append" title="pyspark.pandas.Series.append"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.append</span></code></a>(to_append[, ignore_index, …])</p></td> |
| <td><p>Concatenate two or more Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.compare.html#pyspark.pandas.Series.compare" title="pyspark.pandas.Series.compare"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.compare</span></code></a>(other[, keep_shape, keep_equal])</p></td> |
| <td><p>Compare to another Series and show the differences.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.replace.html#pyspark.pandas.Series.replace" title="pyspark.pandas.Series.replace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.replace</span></code></a>([to_replace, value, regex])</p></td> |
| <td><p>Replace values given in to_replace with value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.update.html#pyspark.pandas.Series.update" title="pyspark.pandas.Series.update"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.update</span></code></a>(other)</p></td> |
| <td><p>Modify Series in place using non-NA values from passed Series.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="time-series-related"> |
| <h2>Time series-related<a class="headerlink" href="#time-series-related" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.asof.html#pyspark.pandas.Series.asof" title="pyspark.pandas.Series.asof"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.asof</span></code></a>(where)</p></td> |
| <td><p>Return the last row(s) without any NaNs before <cite>where</cite>.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.shift.html#pyspark.pandas.Series.shift" title="pyspark.pandas.Series.shift"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.shift</span></code></a>([periods, fill_value])</p></td> |
| <td><p>Shift Series/Index by desired number of periods.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.first_valid_index.html#pyspark.pandas.Series.first_valid_index" title="pyspark.pandas.Series.first_valid_index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.first_valid_index</span></code></a>()</p></td> |
| <td><p>Retrieves the index of the first valid value.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.last_valid_index.html#pyspark.pandas.Series.last_valid_index" title="pyspark.pandas.Series.last_valid_index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.last_valid_index</span></code></a>()</p></td> |
| <td><p>Return index for last non-NA/null value.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.at_time.html#pyspark.pandas.Series.at_time" title="pyspark.pandas.Series.at_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.at_time</span></code></a>(time[, asof, axis])</p></td> |
| <td><p>Select values at particular time of day (example: 9:30AM).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.between_time.html#pyspark.pandas.Series.between_time" title="pyspark.pandas.Series.between_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.between_time</span></code></a>(start_time, end_time[, …])</p></td> |
| <td><p>Select values between particular times of the day (example: 9:00-9:30 AM).</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="spark-related"> |
| <h2>Spark-related<a class="headerlink" href="#spark-related" title="Permalink to this headline">¶</a></h2> |
| <p><code class="docutils literal notranslate"><span class="pre">Series.spark</span></code> provides features that does not exist in pandas but |
| in Spark. These can be accessed by <code class="docutils literal notranslate"><span class="pre">Series.spark.<function/property></span></code>.</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.spark.column.html#pyspark.pandas.Series.spark.column" title="pyspark.pandas.Series.spark.column"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.spark.column</span></code></a></p></td> |
| <td><p>Spark Column object representing the Series/Index.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.spark.transform.html#pyspark.pandas.Series.spark.transform" title="pyspark.pandas.Series.spark.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.spark.transform</span></code></a>(func)</p></td> |
| <td><p>Applies a function that takes and returns a Spark column.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.spark.apply.html#pyspark.pandas.Series.spark.apply" title="pyspark.pandas.Series.spark.apply"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.spark.apply</span></code></a>(func)</p></td> |
| <td><p>Applies a function that takes and returns a Spark column.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="accessors"> |
| <h2>Accessors<a class="headerlink" href="#accessors" title="Permalink to this headline">¶</a></h2> |
| <p>Pandas API on Spark provides dtype-specific methods under various accessors. |
| These are separate namespaces within <a class="reference internal" href="api/pyspark.pandas.Series.html#pyspark.pandas.Series" title="pyspark.pandas.Series"><code class="xref py py-class docutils literal notranslate"><span class="pre">Series</span></code></a> that only apply |
| to specific data types.</p> |
| <table class="table"> |
| <colgroup> |
| <col style="width: 29%" /> |
| <col style="width: 71%" /> |
| </colgroup> |
| <thead> |
| <tr class="row-odd"><th class="head"><p>Data Type</p></th> |
| <th class="head"><p>Accessor</p></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>Datetime</p></td> |
| <td><p><a class="reference internal" href="#api-series-dt"><span class="std std-ref">dt</span></a></p></td> |
| </tr> |
| <tr class="row-odd"><td><p>String</p></td> |
| <td><p><a class="reference internal" href="#api-series-str"><span class="std std-ref">str</span></a></p></td> |
| </tr> |
| <tr class="row-even"><td><p>Categorical</p></td> |
| <td><p><a class="reference internal" href="#api-series-cat"><span class="std std-ref">cat</span></a></p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="date-time-handling"> |
| <span id="api-series-dt"></span><h2>Date Time Handling<a class="headerlink" href="#date-time-handling" title="Permalink to this headline">¶</a></h2> |
| <p><code class="docutils literal notranslate"><span class="pre">Series.dt</span></code> can be used to access the values of the series as |
| datetimelike and return several properties. |
| These can be accessed like <code class="docutils literal notranslate"><span class="pre">Series.dt.<property></span></code>.</p> |
| <div class="section" id="datetime-properties"> |
| <h3>Datetime Properties<a class="headerlink" href="#datetime-properties" title="Permalink to this headline">¶</a></h3> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.date.html#pyspark.pandas.Series.dt.date" title="pyspark.pandas.Series.dt.date"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.date</span></code></a></p></td> |
| <td><p>Returns a Series of python datetime.date objects (namely, the date part of Timestamps without timezone information).</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.year.html#pyspark.pandas.Series.dt.year" title="pyspark.pandas.Series.dt.year"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.year</span></code></a></p></td> |
| <td><p>The year of the datetime.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.month.html#pyspark.pandas.Series.dt.month" title="pyspark.pandas.Series.dt.month"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.month</span></code></a></p></td> |
| <td><p>The month of the timestamp as January = 1 December = 12.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.day.html#pyspark.pandas.Series.dt.day" title="pyspark.pandas.Series.dt.day"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.day</span></code></a></p></td> |
| <td><p>The days of the datetime.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.hour.html#pyspark.pandas.Series.dt.hour" title="pyspark.pandas.Series.dt.hour"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.hour</span></code></a></p></td> |
| <td><p>The hours of the datetime.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.minute.html#pyspark.pandas.Series.dt.minute" title="pyspark.pandas.Series.dt.minute"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.minute</span></code></a></p></td> |
| <td><p>The minutes of the datetime.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.second.html#pyspark.pandas.Series.dt.second" title="pyspark.pandas.Series.dt.second"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.second</span></code></a></p></td> |
| <td><p>The seconds of the datetime.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.microsecond.html#pyspark.pandas.Series.dt.microsecond" title="pyspark.pandas.Series.dt.microsecond"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.microsecond</span></code></a></p></td> |
| <td><p>The microseconds of the datetime.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.week.html#pyspark.pandas.Series.dt.week" title="pyspark.pandas.Series.dt.week"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.week</span></code></a></p></td> |
| <td><p>The week ordinal of the year.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.weekofyear.html#pyspark.pandas.Series.dt.weekofyear" title="pyspark.pandas.Series.dt.weekofyear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.weekofyear</span></code></a></p></td> |
| <td><p>The week ordinal of the year.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.dayofweek.html#pyspark.pandas.Series.dt.dayofweek" title="pyspark.pandas.Series.dt.dayofweek"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.dayofweek</span></code></a></p></td> |
| <td><p>The day of the week with Monday=0, Sunday=6.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.weekday.html#pyspark.pandas.Series.dt.weekday" title="pyspark.pandas.Series.dt.weekday"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.weekday</span></code></a></p></td> |
| <td><p>The day of the week with Monday=0, Sunday=6.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.dayofyear.html#pyspark.pandas.Series.dt.dayofyear" title="pyspark.pandas.Series.dt.dayofyear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.dayofyear</span></code></a></p></td> |
| <td><p>The ordinal day of the year.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.quarter.html#pyspark.pandas.Series.dt.quarter" title="pyspark.pandas.Series.dt.quarter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.quarter</span></code></a></p></td> |
| <td><p>The quarter of the date.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_month_start.html#pyspark.pandas.Series.dt.is_month_start" title="pyspark.pandas.Series.dt.is_month_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_month_start</span></code></a></p></td> |
| <td><p>Indicates whether the date is the first day of the month.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_month_end.html#pyspark.pandas.Series.dt.is_month_end" title="pyspark.pandas.Series.dt.is_month_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_month_end</span></code></a></p></td> |
| <td><p>Indicates whether the date is the last day of the month.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_quarter_start.html#pyspark.pandas.Series.dt.is_quarter_start" title="pyspark.pandas.Series.dt.is_quarter_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_quarter_start</span></code></a></p></td> |
| <td><p>Indicator for whether the date is the first day of a quarter.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_quarter_end.html#pyspark.pandas.Series.dt.is_quarter_end" title="pyspark.pandas.Series.dt.is_quarter_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_quarter_end</span></code></a></p></td> |
| <td><p>Indicator for whether the date is the last day of a quarter.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_year_start.html#pyspark.pandas.Series.dt.is_year_start" title="pyspark.pandas.Series.dt.is_year_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_year_start</span></code></a></p></td> |
| <td><p>Indicate whether the date is the first day of a year.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_year_end.html#pyspark.pandas.Series.dt.is_year_end" title="pyspark.pandas.Series.dt.is_year_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_year_end</span></code></a></p></td> |
| <td><p>Indicate whether the date is the last day of the year.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.is_leap_year.html#pyspark.pandas.Series.dt.is_leap_year" title="pyspark.pandas.Series.dt.is_leap_year"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.is_leap_year</span></code></a></p></td> |
| <td><p>Boolean indicator if the date belongs to a leap year.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.daysinmonth.html#pyspark.pandas.Series.dt.daysinmonth" title="pyspark.pandas.Series.dt.daysinmonth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.daysinmonth</span></code></a></p></td> |
| <td><p>The number of days in the month.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.days_in_month.html#pyspark.pandas.Series.dt.days_in_month" title="pyspark.pandas.Series.dt.days_in_month"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.days_in_month</span></code></a></p></td> |
| <td><p>The number of days in the month.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="datetime-methods"> |
| <h3>Datetime Methods<a class="headerlink" href="#datetime-methods" title="Permalink to this headline">¶</a></h3> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.normalize.html#pyspark.pandas.Series.dt.normalize" title="pyspark.pandas.Series.dt.normalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.normalize</span></code></a>()</p></td> |
| <td><p>Convert times to midnight.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.strftime.html#pyspark.pandas.Series.dt.strftime" title="pyspark.pandas.Series.dt.strftime"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.strftime</span></code></a>(date_format)</p></td> |
| <td><p>Convert to a string Series using specified date_format.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.round.html#pyspark.pandas.Series.dt.round" title="pyspark.pandas.Series.dt.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.round</span></code></a>(freq, *args, **kwargs)</p></td> |
| <td><p>Perform round operation on the data to the specified freq.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.floor.html#pyspark.pandas.Series.dt.floor" title="pyspark.pandas.Series.dt.floor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.floor</span></code></a>(freq, *args, **kwargs)</p></td> |
| <td><p>Perform floor operation on the data to the specified freq.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.ceil.html#pyspark.pandas.Series.dt.ceil" title="pyspark.pandas.Series.dt.ceil"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.ceil</span></code></a>(freq, *args, **kwargs)</p></td> |
| <td><p>Perform ceil operation on the data to the specified freq.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.month_name.html#pyspark.pandas.Series.dt.month_name" title="pyspark.pandas.Series.dt.month_name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.month_name</span></code></a>([locale])</p></td> |
| <td><p>Return the month names of the series with specified locale.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.dt.day_name.html#pyspark.pandas.Series.dt.day_name" title="pyspark.pandas.Series.dt.day_name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.dt.day_name</span></code></a>([locale])</p></td> |
| <td><p>Return the day names of the series with specified locale.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="section" id="string-handling"> |
| <span id="api-series-str"></span><h2>String Handling<a class="headerlink" href="#string-handling" title="Permalink to this headline">¶</a></h2> |
| <p><code class="docutils literal notranslate"><span class="pre">Series.str</span></code> can be used to access the values of the series as |
| strings and apply several methods to it. These can be accessed |
| like <code class="docutils literal notranslate"><span class="pre">Series.str.<function/property></span></code>.</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.capitalize.html#pyspark.pandas.Series.str.capitalize" title="pyspark.pandas.Series.str.capitalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.capitalize</span></code></a>()</p></td> |
| <td><p>Convert Strings in the series to be capitalized.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.cat.html#pyspark.pandas.Series.str.cat" title="pyspark.pandas.Series.str.cat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.cat</span></code></a>([others, sep, na_rep, join])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.center.html#pyspark.pandas.Series.str.center" title="pyspark.pandas.Series.str.center"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.center</span></code></a>(width[, fillchar])</p></td> |
| <td><p>Filling left and right side of strings in the Series/Index with an additional character.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.contains.html#pyspark.pandas.Series.str.contains" title="pyspark.pandas.Series.str.contains"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.contains</span></code></a>(pat[, case, flags, na, …])</p></td> |
| <td><p>Test if pattern or regex is contained within a string of a Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.count.html#pyspark.pandas.Series.str.count" title="pyspark.pandas.Series.str.count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.count</span></code></a>(pat[, flags])</p></td> |
| <td><p>Count occurrences of pattern in each string of the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.decode.html#pyspark.pandas.Series.str.decode" title="pyspark.pandas.Series.str.decode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.decode</span></code></a>(encoding[, errors])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.encode.html#pyspark.pandas.Series.str.encode" title="pyspark.pandas.Series.str.encode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.encode</span></code></a>(encoding[, errors])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.endswith.html#pyspark.pandas.Series.str.endswith" title="pyspark.pandas.Series.str.endswith"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.endswith</span></code></a>(pattern[, na])</p></td> |
| <td><p>Test if the end of each string element matches a pattern.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.extract.html#pyspark.pandas.Series.str.extract" title="pyspark.pandas.Series.str.extract"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.extract</span></code></a>(pat[, flags, expand])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.extractall.html#pyspark.pandas.Series.str.extractall" title="pyspark.pandas.Series.str.extractall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.extractall</span></code></a>(pat[, flags])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.find.html#pyspark.pandas.Series.str.find" title="pyspark.pandas.Series.str.find"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.find</span></code></a>(sub[, start, end])</p></td> |
| <td><p>Return lowest indexes in each strings in the Series where the substring is fully contained between [start:end].</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.findall.html#pyspark.pandas.Series.str.findall" title="pyspark.pandas.Series.str.findall"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.findall</span></code></a>(pat[, flags])</p></td> |
| <td><p>Find all occurrences of pattern or regular expression in the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.get.html#pyspark.pandas.Series.str.get" title="pyspark.pandas.Series.str.get"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.get</span></code></a>(i)</p></td> |
| <td><p>Extract element from each string or string list/tuple in the Series at the specified position.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.get_dummies.html#pyspark.pandas.Series.str.get_dummies" title="pyspark.pandas.Series.str.get_dummies"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.get_dummies</span></code></a>([sep])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.index.html#pyspark.pandas.Series.str.index" title="pyspark.pandas.Series.str.index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.index</span></code></a>(sub[, start, end])</p></td> |
| <td><p>Return lowest indexes in each strings where the substring is fully contained between [start:end].</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isalnum.html#pyspark.pandas.Series.str.isalnum" title="pyspark.pandas.Series.str.isalnum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isalnum</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are alphanumeric.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isalpha.html#pyspark.pandas.Series.str.isalpha" title="pyspark.pandas.Series.str.isalpha"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isalpha</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are alphabetic.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isdigit.html#pyspark.pandas.Series.str.isdigit" title="pyspark.pandas.Series.str.isdigit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isdigit</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are digits.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isspace.html#pyspark.pandas.Series.str.isspace" title="pyspark.pandas.Series.str.isspace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isspace</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are whitespaces.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.islower.html#pyspark.pandas.Series.str.islower" title="pyspark.pandas.Series.str.islower"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.islower</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are lowercase.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isupper.html#pyspark.pandas.Series.str.isupper" title="pyspark.pandas.Series.str.isupper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isupper</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are uppercase.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.istitle.html#pyspark.pandas.Series.str.istitle" title="pyspark.pandas.Series.str.istitle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.istitle</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are titlecase.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isnumeric.html#pyspark.pandas.Series.str.isnumeric" title="pyspark.pandas.Series.str.isnumeric"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isnumeric</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are numeric.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.isdecimal.html#pyspark.pandas.Series.str.isdecimal" title="pyspark.pandas.Series.str.isdecimal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.isdecimal</span></code></a>()</p></td> |
| <td><p>Check whether all characters in each string are decimals.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.join.html#pyspark.pandas.Series.str.join" title="pyspark.pandas.Series.str.join"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.join</span></code></a>(sep)</p></td> |
| <td><p>Join lists contained as elements in the Series with passed delimiter.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.len.html#pyspark.pandas.Series.str.len" title="pyspark.pandas.Series.str.len"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.len</span></code></a>()</p></td> |
| <td><p>Computes the length of each element in the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.ljust.html#pyspark.pandas.Series.str.ljust" title="pyspark.pandas.Series.str.ljust"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.ljust</span></code></a>(width[, fillchar])</p></td> |
| <td><p>Filling right side of strings in the Series with an additional character.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.lower.html#pyspark.pandas.Series.str.lower" title="pyspark.pandas.Series.str.lower"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.lower</span></code></a>()</p></td> |
| <td><p>Convert strings in the Series/Index to all lowercase.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.lstrip.html#pyspark.pandas.Series.str.lstrip" title="pyspark.pandas.Series.str.lstrip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.lstrip</span></code></a>([to_strip])</p></td> |
| <td><p>Remove leading characters.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.match.html#pyspark.pandas.Series.str.match" title="pyspark.pandas.Series.str.match"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.match</span></code></a>(pat[, case, flags, na])</p></td> |
| <td><p>Determine if each string matches a regular expression.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.normalize.html#pyspark.pandas.Series.str.normalize" title="pyspark.pandas.Series.str.normalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.normalize</span></code></a>(form)</p></td> |
| <td><p>Return the Unicode normal form for the strings in the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.pad.html#pyspark.pandas.Series.str.pad" title="pyspark.pandas.Series.str.pad"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.pad</span></code></a>(width[, side, fillchar])</p></td> |
| <td><p>Pad strings in the Series up to width.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.partition.html#pyspark.pandas.Series.str.partition" title="pyspark.pandas.Series.str.partition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.partition</span></code></a>([sep, expand])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.repeat.html#pyspark.pandas.Series.str.repeat" title="pyspark.pandas.Series.str.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.repeat</span></code></a>(repeats)</p></td> |
| <td><p>Duplicate each string in the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.replace.html#pyspark.pandas.Series.str.replace" title="pyspark.pandas.Series.str.replace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.replace</span></code></a>(pat, repl[, n, case, …])</p></td> |
| <td><p>Replace occurrences of pattern/regex in the Series with some other string.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rfind.html#pyspark.pandas.Series.str.rfind" title="pyspark.pandas.Series.str.rfind"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rfind</span></code></a>(sub[, start, end])</p></td> |
| <td><p>Return highest indexes in each strings in the Series where the substring is fully contained between [start:end].</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rindex.html#pyspark.pandas.Series.str.rindex" title="pyspark.pandas.Series.str.rindex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rindex</span></code></a>(sub[, start, end])</p></td> |
| <td><p>Return highest indexes in each strings where the substring is fully contained between [start:end].</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rjust.html#pyspark.pandas.Series.str.rjust" title="pyspark.pandas.Series.str.rjust"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rjust</span></code></a>(width[, fillchar])</p></td> |
| <td><p>Filling left side of strings in the Series with an additional character.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rpartition.html#pyspark.pandas.Series.str.rpartition" title="pyspark.pandas.Series.str.rpartition"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rpartition</span></code></a>([sep, expand])</p></td> |
| <td><p>Not supported.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rsplit.html#pyspark.pandas.Series.str.rsplit" title="pyspark.pandas.Series.str.rsplit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rsplit</span></code></a>([pat, n, expand])</p></td> |
| <td><p>Split strings around given separator/delimiter.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.rstrip.html#pyspark.pandas.Series.str.rstrip" title="pyspark.pandas.Series.str.rstrip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.rstrip</span></code></a>([to_strip])</p></td> |
| <td><p>Remove trailing characters.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.slice.html#pyspark.pandas.Series.str.slice" title="pyspark.pandas.Series.str.slice"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.slice</span></code></a>([start, stop, step])</p></td> |
| <td><p>Slice substrings from each element in the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.slice_replace.html#pyspark.pandas.Series.str.slice_replace" title="pyspark.pandas.Series.str.slice_replace"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.slice_replace</span></code></a>([start, stop, repl])</p></td> |
| <td><p>Slice substrings from each element in the Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.split.html#pyspark.pandas.Series.str.split" title="pyspark.pandas.Series.str.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.split</span></code></a>([pat, n, expand])</p></td> |
| <td><p>Split strings around given separator/delimiter.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.startswith.html#pyspark.pandas.Series.str.startswith" title="pyspark.pandas.Series.str.startswith"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.startswith</span></code></a>(pattern[, na])</p></td> |
| <td><p>Test if the start of each string element matches a pattern.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.strip.html#pyspark.pandas.Series.str.strip" title="pyspark.pandas.Series.str.strip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.strip</span></code></a>([to_strip])</p></td> |
| <td><p>Remove leading and trailing characters.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.swapcase.html#pyspark.pandas.Series.str.swapcase" title="pyspark.pandas.Series.str.swapcase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.swapcase</span></code></a>()</p></td> |
| <td><p>Convert strings in the Series/Index to be swapcased.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.title.html#pyspark.pandas.Series.str.title" title="pyspark.pandas.Series.str.title"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.title</span></code></a>()</p></td> |
| <td><p>Convert Strings in the series to be titlecase.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.translate.html#pyspark.pandas.Series.str.translate" title="pyspark.pandas.Series.str.translate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.translate</span></code></a>(table)</p></td> |
| <td><p>Map all characters in the string through the given mapping table.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.upper.html#pyspark.pandas.Series.str.upper" title="pyspark.pandas.Series.str.upper"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.upper</span></code></a>()</p></td> |
| <td><p>Convert strings in the Series/Index to all uppercase.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.wrap.html#pyspark.pandas.Series.str.wrap" title="pyspark.pandas.Series.str.wrap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.wrap</span></code></a>(width, **kwargs)</p></td> |
| <td><p>Wrap long strings in the Series to be formatted in paragraphs with length less than a given width.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.str.zfill.html#pyspark.pandas.Series.str.zfill" title="pyspark.pandas.Series.str.zfill"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.str.zfill</span></code></a>(width)</p></td> |
| <td><p>Pad strings in the Series by prepending ‘0’ characters.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="categorical-accessor"> |
| <span id="api-series-cat"></span><h2>Categorical accessor<a class="headerlink" href="#categorical-accessor" title="Permalink to this headline">¶</a></h2> |
| <p>Categorical-dtype specific methods and attributes are available under |
| the <code class="docutils literal notranslate"><span class="pre">Series.cat</span></code> accessor.</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.categories.html#pyspark.pandas.Series.cat.categories" title="pyspark.pandas.Series.cat.categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.categories</span></code></a></p></td> |
| <td><p>The categories of this categorical.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.ordered.html#pyspark.pandas.Series.cat.ordered" title="pyspark.pandas.Series.cat.ordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.ordered</span></code></a></p></td> |
| <td><p>Whether the categories have an ordered relationship.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.codes.html#pyspark.pandas.Series.cat.codes" title="pyspark.pandas.Series.cat.codes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.codes</span></code></a></p></td> |
| <td><p>Return Series of codes as well as the index.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.rename_categories.html#pyspark.pandas.Series.cat.rename_categories" title="pyspark.pandas.Series.cat.rename_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.rename_categories</span></code></a>(new_categories)</p></td> |
| <td><p>Rename categories.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.reorder_categories.html#pyspark.pandas.Series.cat.reorder_categories" title="pyspark.pandas.Series.cat.reorder_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.reorder_categories</span></code></a>(new_categories)</p></td> |
| <td><p>Reorder categories as specified in new_categories.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.add_categories.html#pyspark.pandas.Series.cat.add_categories" title="pyspark.pandas.Series.cat.add_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.add_categories</span></code></a>(new_categories[, …])</p></td> |
| <td><p>Add new categories.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.remove_categories.html#pyspark.pandas.Series.cat.remove_categories" title="pyspark.pandas.Series.cat.remove_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.remove_categories</span></code></a>(removals[, inplace])</p></td> |
| <td><p>Remove the specified categories.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.remove_unused_categories.html#pyspark.pandas.Series.cat.remove_unused_categories" title="pyspark.pandas.Series.cat.remove_unused_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.remove_unused_categories</span></code></a>([inplace])</p></td> |
| <td><p>Remove categories which are not used.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.set_categories.html#pyspark.pandas.Series.cat.set_categories" title="pyspark.pandas.Series.cat.set_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.set_categories</span></code></a>(new_categories[, …])</p></td> |
| <td><p>Set the categories to the specified new_categories.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.as_ordered.html#pyspark.pandas.Series.cat.as_ordered" title="pyspark.pandas.Series.cat.as_ordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.as_ordered</span></code></a>([inplace])</p></td> |
| <td><p>Set the Categorical to be ordered.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.cat.as_unordered.html#pyspark.pandas.Series.cat.as_unordered" title="pyspark.pandas.Series.cat.as_unordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.cat.as_unordered</span></code></a>([inplace])</p></td> |
| <td><p>Set the Categorical to be unordered.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="plotting"> |
| <span id="api-series-plot"></span><h2>Plotting<a class="headerlink" href="#plotting" title="Permalink to this headline">¶</a></h2> |
| <p><code class="docutils literal notranslate"><span class="pre">Series.plot</span></code> is both a callable method and a namespace attribute for |
| specific plotting methods of the form <code class="docutils literal notranslate"><span class="pre">Series.plot.<kind></span></code>.</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.html#pyspark.pandas.Series.plot" title="pyspark.pandas.Series.plot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot</span></code></a></p></td> |
| <td><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">pyspark.pandas.plot.core.PandasOnSparkPlotAccessor</span></code></p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.area.html#pyspark.pandas.Series.plot.area" title="pyspark.pandas.Series.plot.area"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.area</span></code></a>([x, y])</p></td> |
| <td><p>Draw a stacked area plot.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.bar.html#pyspark.pandas.Series.plot.bar" title="pyspark.pandas.Series.plot.bar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.bar</span></code></a>([x, y])</p></td> |
| <td><p>Vertical bar plot.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.barh.html#pyspark.pandas.Series.plot.barh" title="pyspark.pandas.Series.plot.barh"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.barh</span></code></a>([x, y])</p></td> |
| <td><p>Make a horizontal bar plot.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.box.html#pyspark.pandas.Series.plot.box" title="pyspark.pandas.Series.plot.box"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.box</span></code></a>(**kwds)</p></td> |
| <td><p>Make a box plot of the Series columns.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.density.html#pyspark.pandas.Series.plot.density" title="pyspark.pandas.Series.plot.density"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.density</span></code></a>([bw_method, ind])</p></td> |
| <td><p>Generate Kernel Density Estimate plot using Gaussian kernels.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.hist.html#pyspark.pandas.Series.plot.hist" title="pyspark.pandas.Series.plot.hist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.hist</span></code></a>([bins])</p></td> |
| <td><p>Draw one histogram of the DataFrame’s columns.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.line.html#pyspark.pandas.Series.plot.line" title="pyspark.pandas.Series.plot.line"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.line</span></code></a>([x, y])</p></td> |
| <td><p>Plot DataFrame/Series as lines.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.pie.html#pyspark.pandas.Series.plot.pie" title="pyspark.pandas.Series.plot.pie"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.pie</span></code></a>(**kwds)</p></td> |
| <td><p>Generate a pie plot.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.plot.kde.html#pyspark.pandas.Series.plot.kde" title="pyspark.pandas.Series.plot.kde"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.plot.kde</span></code></a>([bw_method, ind])</p></td> |
| <td><p>Generate Kernel Density Estimate plot using Gaussian kernels.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.hist.html#pyspark.pandas.Series.hist" title="pyspark.pandas.Series.hist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.hist</span></code></a>([bins])</p></td> |
| <td><p>Draw one histogram of the DataFrame’s columns.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="serialization-io-conversion"> |
| <h2>Serialization / IO / Conversion<a class="headerlink" href="#serialization-io-conversion" title="Permalink to this headline">¶</a></h2> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_pandas.html#pyspark.pandas.Series.to_pandas" title="pyspark.pandas.Series.to_pandas"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_pandas</span></code></a>()</p></td> |
| <td><p>Return a pandas Series.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_numpy.html#pyspark.pandas.Series.to_numpy" title="pyspark.pandas.Series.to_numpy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_numpy</span></code></a>()</p></td> |
| <td><p>A NumPy ndarray representing the values in this DataFrame or Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_list.html#pyspark.pandas.Series.to_list" title="pyspark.pandas.Series.to_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_list</span></code></a>()</p></td> |
| <td><p>Return a list of the values.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_string.html#pyspark.pandas.Series.to_string" title="pyspark.pandas.Series.to_string"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_string</span></code></a>([buf, na_rep, …])</p></td> |
| <td><p>Render a string representation of the Series.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_dict.html#pyspark.pandas.Series.to_dict" title="pyspark.pandas.Series.to_dict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_dict</span></code></a>([into])</p></td> |
| <td><p>Convert Series to {label -> value} dict or dict-like object.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_clipboard.html#pyspark.pandas.Series.to_clipboard" title="pyspark.pandas.Series.to_clipboard"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_clipboard</span></code></a>([excel, sep])</p></td> |
| <td><p>Copy object to the system clipboard.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_latex.html#pyspark.pandas.Series.to_latex" title="pyspark.pandas.Series.to_latex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_latex</span></code></a>([buf, columns, col_space, …])</p></td> |
| <td><p>Render an object to a LaTeX tabular environment table.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_markdown.html#pyspark.pandas.Series.to_markdown" title="pyspark.pandas.Series.to_markdown"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_markdown</span></code></a>([buf, mode])</p></td> |
| <td><p>Print Series or DataFrame in Markdown-friendly format.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_json.html#pyspark.pandas.Series.to_json" title="pyspark.pandas.Series.to_json"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_json</span></code></a>([path, compression, …])</p></td> |
| <td><p>Convert the object to a JSON string.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_csv.html#pyspark.pandas.Series.to_csv" title="pyspark.pandas.Series.to_csv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_csv</span></code></a>([path, sep, na_rep, columns, …])</p></td> |
| <td><p>Write object to a comma-separated values (csv) file.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_excel.html#pyspark.pandas.Series.to_excel" title="pyspark.pandas.Series.to_excel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_excel</span></code></a>(excel_writer[, sheet_name, …])</p></td> |
| <td><p>Write object to an Excel sheet.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.to_frame.html#pyspark.pandas.Series.to_frame" title="pyspark.pandas.Series.to_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.to_frame</span></code></a>([name])</p></td> |
| <td><p>Convert Series to DataFrame.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="section" id="pandas-on-spark-specific"> |
| <h2>Pandas-on-Spark specific<a class="headerlink" href="#pandas-on-spark-specific" title="Permalink to this headline">¶</a></h2> |
| <p><code class="docutils literal notranslate"><span class="pre">Series.pandas_on_spark</span></code> provides pandas-on-Spark specific features that exists only in pandas API on Spark. |
| These can be accessed by <code class="docutils literal notranslate"><span class="pre">Series.pandas_on_spark.<function/property></span></code>.</p> |
| <table class="longtable table autosummary"> |
| <colgroup> |
| <col style="width: 10%" /> |
| <col style="width: 90%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Series.pandas_on_spark.transform_batch.html#pyspark.pandas.Series.pandas_on_spark.transform_batch" title="pyspark.pandas.Series.pandas_on_spark.transform_batch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Series.pandas_on_spark.transform_batch</span></code></a>(func, …)</p></td> |
| <td><p>Transform the data with the function that takes pandas Series and outputs pandas Series.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| |
| <div class='prev-next-bottom'> |
| |
| <a class='left-prev' id="prev-link" href="api/pyspark.pandas.timedelta_range.html" title="previous page">pyspark.pandas.timedelta_range</a> |
| <a class='right-next' id="next-link" href="api/pyspark.pandas.Series.html" title="next page">pyspark.pandas.Series</a> |
| |
| </div> |
| |
| </main> |
| |
| |
| </div> |
| </div> |
| |
| |
| <script src="../../_static/js/index.3da636dd464baa7582d2.js"></script> |
| |
| |
| <footer class="footer mt-5 mt-md-0"> |
| <div class="container"> |
| <p> |
| © Copyright .<br/> |
| Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.<br/> |
| </p> |
| </div> |
| </footer> |
| </body> |
| </html> |