blob: 383ddc4c67faed70d61fe4733b3ad0b01b678df8 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Index objects &#8212; PySpark 3.3.3 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/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/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="search" title="Search" href="../../search.html" />
<link rel="next" title="pyspark.pandas.Index" href="api/pyspark.pandas.Index.html" />
<link rel="prev" title="pyspark.pandas.DataFrame.pandas_on_spark.transform_batch" href="api/pyspark.pandas.DataFrame.pandas_on_spark.transform_batch.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="">
<a href="series.html">Series</a>
</li>
<li class="">
<a href="frame.html">DataFrame</a>
</li>
<li class="active">
<a href="">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="#index" class="nav-link">Index</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#properties" class="nav-link">Properties</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#modifying-and-computations" class="nav-link">Modifying and computations</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#compatibility-with-multiindex" class="nav-link">Compatibility with MultiIndex</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#missing-values" class="nav-link">Missing Values</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#conversion" class="nav-link">Conversion</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#spark-related" class="nav-link">Spark-related</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#sorting" class="nav-link">Sorting</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#time-specific-operations" class="nav-link">Time-specific operations</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#combining-joining-set-operations" class="nav-link">Combining / joining / set operations</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#selecting" class="nav-link">Selecting</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#numeric-index" class="nav-link">Numeric Index</a>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#categoricalindex" class="nav-link">CategoricalIndex</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#categorical-components" class="nav-link">Categorical components</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#multiindex" class="nav-link">MultiIndex</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-constructors" class="nav-link">MultiIndex Constructors</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-properties" class="nav-link">MultiIndex Properties</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-components" class="nav-link">MultiIndex components</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#id1" class="nav-link">MultiIndex components</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-missing-values" class="nav-link">MultiIndex Missing Values</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-modifying-and-computations" class="nav-link">MultiIndex Modifying and computations</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-combining-joining-set-operations" class="nav-link">MultiIndex Combining / joining / set operations</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-conversion" class="nav-link">MultiIndex Conversion</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#multiindex-spark-related" class="nav-link">MultiIndex Spark-related</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#multiindex-sorting" class="nav-link">MultiIndex Sorting</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#datatimeindex" class="nav-link">DatatimeIndex</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#time-date-components" class="nav-link">Time/date components</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#id2" class="nav-link">Selecting</a>
</li>
<li class="nav-item toc-entry toc-h3">
<a href="#id3" class="nav-link">Time-specific operations</a>
</li>
</ul>
</li>
<li class="nav-item toc-entry toc-h2">
<a href="#timedeltaindex" class="nav-link">TimedeltaIndex</a><ul class="nav section-nav flex-column">
<li class="nav-item toc-entry toc-h3">
<a href="#components" class="nav-link">Components</a>
</li>
</ul>
</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="index-objects">
<span id="api-indexing"></span><h1>Index objects<a class="headerlink" href="#index-objects" title="Permalink to this headline"></a></h1>
<div class="section" id="index">
<h2>Index<a class="headerlink" href="#index" 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.Index.html#pyspark.pandas.Index" title="pyspark.pandas.Index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index</span></code></a></p></td>
<td><p>pandas-on-Spark Index that corresponds to pandas Index logically.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="properties">
<h3>Properties<a class="headerlink" href="#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.Index.is_monotonic.html#pyspark.pandas.Index.is_monotonic" title="pyspark.pandas.Index.is_monotonic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_monotonic_increasing.html#pyspark.pandas.Index.is_monotonic_increasing" title="pyspark.pandas.Index.is_monotonic_increasing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_monotonic_decreasing.html#pyspark.pandas.Index.is_monotonic_decreasing" title="pyspark.pandas.Index.is_monotonic_decreasing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_monotonic_decreasing</span></code></a></p></td>
<td><p>Return boolean if values in the object are monotonically decreasing.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_unique.html#pyspark.pandas.Index.is_unique" title="pyspark.pandas.Index.is_unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_unique</span></code></a></p></td>
<td><p>Return if the index has unique values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.has_duplicates.html#pyspark.pandas.Index.has_duplicates" title="pyspark.pandas.Index.has_duplicates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.has_duplicates</span></code></a></p></td>
<td><p>If index has duplicates, return True, otherwise False.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.hasnans.html#pyspark.pandas.Index.hasnans" title="pyspark.pandas.Index.hasnans"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.hasnans</span></code></a></p></td>
<td><p>Return True if it has any missing values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.dtype.html#pyspark.pandas.Index.dtype" title="pyspark.pandas.Index.dtype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.dtype</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.Index.inferred_type.html#pyspark.pandas.Index.inferred_type" title="pyspark.pandas.Index.inferred_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.inferred_type</span></code></a></p></td>
<td><p>Return a string of the type inferred from the values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_all_dates.html#pyspark.pandas.Index.is_all_dates" title="pyspark.pandas.Index.is_all_dates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_all_dates</span></code></a></p></td>
<td><p>Return if all data types of the index are datetime.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.shape.html#pyspark.pandas.Index.shape" title="pyspark.pandas.Index.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.name.html#pyspark.pandas.Index.name" title="pyspark.pandas.Index.name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.name</span></code></a></p></td>
<td><p>Return name of the Index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.names.html#pyspark.pandas.Index.names" title="pyspark.pandas.Index.names"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.names</span></code></a></p></td>
<td><p>Return names of the Index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.ndim.html#pyspark.pandas.Index.ndim" title="pyspark.pandas.Index.ndim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.ndim</span></code></a></p></td>
<td><p>Return an int representing the number of array dimensions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.size.html#pyspark.pandas.Index.size" title="pyspark.pandas.Index.size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.nlevels.html#pyspark.pandas.Index.nlevels" title="pyspark.pandas.Index.nlevels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.nlevels</span></code></a></p></td>
<td><p>Number of levels in Index &amp; MultiIndex.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.empty.html#pyspark.pandas.Index.empty" title="pyspark.pandas.Index.empty"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.empty</span></code></a></p></td>
<td><p>Returns true if the current object is empty.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.T.html#pyspark.pandas.Index.T" title="pyspark.pandas.Index.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.T</span></code></a></p></td>
<td><p>Return the transpose, For index, It will be index itself.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.values.html#pyspark.pandas.Index.values" title="pyspark.pandas.Index.values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.values</span></code></a></p></td>
<td><p>Return an array representing the data in the Index.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="modifying-and-computations">
<h3>Modifying and computations<a class="headerlink" href="#modifying-and-computations" 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.Index.all.html#pyspark.pandas.Index.all" title="pyspark.pandas.Index.all"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.all</span></code></a>([axis, skipna])</p></td>
<td><p>Return whether all elements are True.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.any.html#pyspark.pandas.Index.any" title="pyspark.pandas.Index.any"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.any</span></code></a>([axis])</p></td>
<td><p>Return whether any element is True.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.argmin.html#pyspark.pandas.Index.argmin" title="pyspark.pandas.Index.argmin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.argmin</span></code></a>()</p></td>
<td><p>Return a minimum argument indexer.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.argmax.html#pyspark.pandas.Index.argmax" title="pyspark.pandas.Index.argmax"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.argmax</span></code></a>()</p></td>
<td><p>Return a maximum argument indexer.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.copy.html#pyspark.pandas.Index.copy" title="pyspark.pandas.Index.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.copy</span></code></a>([name, deep])</p></td>
<td><p>Make a copy of this object.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.delete.html#pyspark.pandas.Index.delete" title="pyspark.pandas.Index.delete"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.delete</span></code></a>(loc)</p></td>
<td><p>Make new Index with passed location(-s) deleted.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.equals.html#pyspark.pandas.Index.equals" title="pyspark.pandas.Index.equals"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.equals</span></code></a>(other)</p></td>
<td><p>Determine if two Index objects contain the same elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.factorize.html#pyspark.pandas.Index.factorize" title="pyspark.pandas.Index.factorize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.factorize</span></code></a>([sort, na_sentinel])</p></td>
<td><p>Encode the object as an enumerated type or categorical variable.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.identical.html#pyspark.pandas.Index.identical" title="pyspark.pandas.Index.identical"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.identical</span></code></a>(other)</p></td>
<td><p>Similar to equals, but check that other comparable attributes are also equal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.insert.html#pyspark.pandas.Index.insert" title="pyspark.pandas.Index.insert"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.insert</span></code></a>(loc, item)</p></td>
<td><p>Make new Index inserting new item at location.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_boolean.html#pyspark.pandas.Index.is_boolean" title="pyspark.pandas.Index.is_boolean"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_boolean</span></code></a>()</p></td>
<td><p>Return if the current index type is a boolean type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_categorical.html#pyspark.pandas.Index.is_categorical" title="pyspark.pandas.Index.is_categorical"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_categorical</span></code></a>()</p></td>
<td><p>Return if the current index type is a categorical type.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_floating.html#pyspark.pandas.Index.is_floating" title="pyspark.pandas.Index.is_floating"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_floating</span></code></a>()</p></td>
<td><p>Return if the current index type is a floating type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_integer.html#pyspark.pandas.Index.is_integer" title="pyspark.pandas.Index.is_integer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_integer</span></code></a>()</p></td>
<td><p>Return if the current index type is a integer type.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_interval.html#pyspark.pandas.Index.is_interval" title="pyspark.pandas.Index.is_interval"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_interval</span></code></a>()</p></td>
<td><p>Return if the current index type is an interval type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_numeric.html#pyspark.pandas.Index.is_numeric" title="pyspark.pandas.Index.is_numeric"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_numeric</span></code></a>()</p></td>
<td><p>Return if the current index type is a numeric type.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.is_object.html#pyspark.pandas.Index.is_object" title="pyspark.pandas.Index.is_object"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.is_object</span></code></a>()</p></td>
<td><p>Return if the current index type is a object type.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.drop.html#pyspark.pandas.Index.drop" title="pyspark.pandas.Index.drop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.drop</span></code></a>(labels)</p></td>
<td><p>Make new Index with passed list of labels deleted.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.drop_duplicates.html#pyspark.pandas.Index.drop_duplicates" title="pyspark.pandas.Index.drop_duplicates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.drop_duplicates</span></code></a>()</p></td>
<td><p>Return Index with duplicate values removed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.min.html#pyspark.pandas.Index.min" title="pyspark.pandas.Index.min"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.min</span></code></a>()</p></td>
<td><p>Return the minimum value of the Index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.max.html#pyspark.pandas.Index.max" title="pyspark.pandas.Index.max"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.max</span></code></a>()</p></td>
<td><p>Return the maximum value of the Index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.map.html#pyspark.pandas.Index.map" title="pyspark.pandas.Index.map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.map</span></code></a>(mapper[, na_action])</p></td>
<td><p>Map values using input correspondence (a dict, Series, or function).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.rename.html#pyspark.pandas.Index.rename" title="pyspark.pandas.Index.rename"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.rename</span></code></a>(name[, inplace])</p></td>
<td><p>Alter Index or MultiIndex name.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.repeat.html#pyspark.pandas.Index.repeat" title="pyspark.pandas.Index.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.repeat</span></code></a>(repeats)</p></td>
<td><p>Repeat elements of a Index/MultiIndex.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.take.html#pyspark.pandas.Index.take" title="pyspark.pandas.Index.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.unique.html#pyspark.pandas.Index.unique" title="pyspark.pandas.Index.unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.unique</span></code></a>([level])</p></td>
<td><p>Return unique values in the index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.nunique.html#pyspark.pandas.Index.nunique" title="pyspark.pandas.Index.nunique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.value_counts.html#pyspark.pandas.Index.value_counts" title="pyspark.pandas.Index.value_counts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.value_counts</span></code></a>([normalize, sort, …])</p></td>
<td><p>Return a Series containing counts of unique values.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="compatibility-with-multiindex">
<h3>Compatibility with MultiIndex<a class="headerlink" href="#compatibility-with-multiindex" 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.Index.set_names.html#pyspark.pandas.Index.set_names" title="pyspark.pandas.Index.set_names"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.set_names</span></code></a>(names[, level, inplace])</p></td>
<td><p>Set Index or MultiIndex name.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.droplevel.html#pyspark.pandas.Index.droplevel" title="pyspark.pandas.Index.droplevel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.droplevel</span></code></a>(level)</p></td>
<td><p>Return index with requested level(s) removed.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="missing-values">
<h3>Missing Values<a class="headerlink" href="#missing-values" 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.Index.fillna.html#pyspark.pandas.Index.fillna" title="pyspark.pandas.Index.fillna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.fillna</span></code></a>(value)</p></td>
<td><p>Fill NA/NaN values with the specified value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.dropna.html#pyspark.pandas.Index.dropna" title="pyspark.pandas.Index.dropna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.dropna</span></code></a>()</p></td>
<td><p>Return Index or MultiIndex without NA/NaN values</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.isna.html#pyspark.pandas.Index.isna" title="pyspark.pandas.Index.isna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.notna.html#pyspark.pandas.Index.notna" title="pyspark.pandas.Index.notna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.notna</span></code></a>()</p></td>
<td><p>Detect existing (non-missing) values.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="conversion">
<h3>Conversion<a class="headerlink" href="#conversion" 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.Index.astype.html#pyspark.pandas.Index.astype" title="pyspark.pandas.Index.astype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.item.html#pyspark.pandas.Index.item" title="pyspark.pandas.Index.item"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.to_list.html#pyspark.pandas.Index.to_list" title="pyspark.pandas.Index.to_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.to_series.html#pyspark.pandas.Index.to_series" title="pyspark.pandas.Index.to_series"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.to_series</span></code></a>([name])</p></td>
<td><p>Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.to_frame.html#pyspark.pandas.Index.to_frame" title="pyspark.pandas.Index.to_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.to_frame</span></code></a>([index, name])</p></td>
<td><p>Create a DataFrame with a column containing the Index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.view.html#pyspark.pandas.Index.view" title="pyspark.pandas.Index.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.view</span></code></a>()</p></td>
<td><p>this is defined as a copy with the same identity</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.to_numpy.html#pyspark.pandas.Index.to_numpy" title="pyspark.pandas.Index.to_numpy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.to_numpy</span></code></a>([dtype, copy])</p></td>
<td><p>A NumPy ndarray representing the values in this Index or MultiIndex.</p></td>
</tr>
</tbody>
</table>
</div>
</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">Index.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">Index.spark.&lt;function/property&gt;</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.Index.spark.column.html#pyspark.pandas.Index.spark.column" title="pyspark.pandas.Index.spark.column"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.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.Index.spark.transform.html#pyspark.pandas.Index.spark.transform" title="pyspark.pandas.Index.spark.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.spark.transform</span></code></a>(func)</p></td>
<td><p>Applies a function that takes and returns a Spark column.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="sorting">
<h3>Sorting<a class="headerlink" href="#sorting" 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.Index.sort_values.html#pyspark.pandas.Index.sort_values" title="pyspark.pandas.Index.sort_values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.sort_values</span></code></a>([ascending])</p></td>
<td><p>Return a sorted copy of the index.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="time-specific-operations">
<h3>Time-specific operations<a class="headerlink" href="#time-specific-operations" 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.Index.shift.html#pyspark.pandas.Index.shift" title="pyspark.pandas.Index.shift"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.shift</span></code></a>([periods, fill_value])</p></td>
<td><p>Shift Series/Index by desired number of periods.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="combining-joining-set-operations">
<h3>Combining / joining / set operations<a class="headerlink" href="#combining-joining-set-operations" 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.Index.append.html#pyspark.pandas.Index.append" title="pyspark.pandas.Index.append"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.append</span></code></a>(other)</p></td>
<td><p>Append a collection of Index options together.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.intersection.html#pyspark.pandas.Index.intersection" title="pyspark.pandas.Index.intersection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.intersection</span></code></a>(other)</p></td>
<td><p>Form the intersection of two Index objects.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.union.html#pyspark.pandas.Index.union" title="pyspark.pandas.Index.union"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.union</span></code></a>(other[, sort])</p></td>
<td><p>Form the union of two Index objects.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.difference.html#pyspark.pandas.Index.difference" title="pyspark.pandas.Index.difference"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.difference</span></code></a>(other[, sort])</p></td>
<td><p>Return a new Index with elements from the index that are not in <cite>other</cite>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.symmetric_difference.html#pyspark.pandas.Index.symmetric_difference" title="pyspark.pandas.Index.symmetric_difference"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.symmetric_difference</span></code></a>(other[, …])</p></td>
<td><p>Compute the symmetric difference of two Index objects.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="selecting">
<h3>Selecting<a class="headerlink" href="#selecting" 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.Index.asof.html#pyspark.pandas.Index.asof" title="pyspark.pandas.Index.asof"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.asof</span></code></a>(label)</p></td>
<td><p>Return the label from the index, or, if not present, the previous one.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Index.isin.html#pyspark.pandas.Index.isin" title="pyspark.pandas.Index.isin"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index.isin</span></code></a>(values)</p></td>
<td><p>Check whether <cite>values</cite> are contained in Series or Index.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="numeric-index">
<span id="api-numeric"></span><h2>Numeric Index<a class="headerlink" href="#numeric-index" 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.Int64Index.html#pyspark.pandas.Int64Index" title="pyspark.pandas.Int64Index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Int64Index</span></code></a></p></td>
<td><p>Immutable sequence used for indexing and alignment.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.Float64Index.html#pyspark.pandas.Float64Index" title="pyspark.pandas.Float64Index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Float64Index</span></code></a></p></td>
<td><p>Immutable sequence used for indexing and alignment.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="categoricalindex">
<span id="api-categorical"></span><h2>CategoricalIndex<a class="headerlink" href="#categoricalindex" 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.CategoricalIndex.html#pyspark.pandas.CategoricalIndex" title="pyspark.pandas.CategoricalIndex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex</span></code></a></p></td>
<td><p>Index based on an underlying <cite>Categorical</cite>.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="categorical-components">
<h3>Categorical components<a class="headerlink" href="#categorical-components" 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.CategoricalIndex.codes.html#pyspark.pandas.CategoricalIndex.codes" title="pyspark.pandas.CategoricalIndex.codes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.codes</span></code></a></p></td>
<td><p>The category codes of this categorical.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.CategoricalIndex.categories.html#pyspark.pandas.CategoricalIndex.categories" title="pyspark.pandas.CategoricalIndex.categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.categories</span></code></a></p></td>
<td><p>The categories of this categorical.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.CategoricalIndex.ordered.html#pyspark.pandas.CategoricalIndex.ordered" title="pyspark.pandas.CategoricalIndex.ordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.ordered</span></code></a></p></td>
<td><p>Whether the categories have an ordered relationship.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.CategoricalIndex.rename_categories.html#pyspark.pandas.CategoricalIndex.rename_categories" title="pyspark.pandas.CategoricalIndex.rename_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.rename_categories</span></code></a>(…[, …])</p></td>
<td><p>Rename categories.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.CategoricalIndex.reorder_categories.html#pyspark.pandas.CategoricalIndex.reorder_categories" title="pyspark.pandas.CategoricalIndex.reorder_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.reorder_categories</span></code></a>(…[, …])</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.CategoricalIndex.add_categories.html#pyspark.pandas.CategoricalIndex.add_categories" title="pyspark.pandas.CategoricalIndex.add_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.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.CategoricalIndex.remove_categories.html#pyspark.pandas.CategoricalIndex.remove_categories" title="pyspark.pandas.CategoricalIndex.remove_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.remove_categories</span></code></a>(removals)</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.CategoricalIndex.remove_unused_categories.html#pyspark.pandas.CategoricalIndex.remove_unused_categories" title="pyspark.pandas.CategoricalIndex.remove_unused_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.remove_unused_categories</span></code></a>([…])</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.CategoricalIndex.set_categories.html#pyspark.pandas.CategoricalIndex.set_categories" title="pyspark.pandas.CategoricalIndex.set_categories"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.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.CategoricalIndex.as_ordered.html#pyspark.pandas.CategoricalIndex.as_ordered" title="pyspark.pandas.CategoricalIndex.as_ordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.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.CategoricalIndex.as_unordered.html#pyspark.pandas.CategoricalIndex.as_unordered" title="pyspark.pandas.CategoricalIndex.as_unordered"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.as_unordered</span></code></a>([inplace])</p></td>
<td><p>Set the Categorical to be unordered.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.CategoricalIndex.map.html#pyspark.pandas.CategoricalIndex.map" title="pyspark.pandas.CategoricalIndex.map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoricalIndex.map</span></code></a>(mapper)</p></td>
<td><p>Map values using input correspondence (a dict, Series, or function).</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="multiindex">
<span id="api-multiindex"></span><h2>MultiIndex<a class="headerlink" href="#multiindex" 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.MultiIndex.html#pyspark.pandas.MultiIndex" title="pyspark.pandas.MultiIndex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex</span></code></a></p></td>
<td><p>pandas-on-Spark MultiIndex that corresponds to pandas MultiIndex logically.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="multiindex-constructors">
<h3>MultiIndex Constructors<a class="headerlink" href="#multiindex-constructors" 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.MultiIndex.from_arrays.html#pyspark.pandas.MultiIndex.from_arrays" title="pyspark.pandas.MultiIndex.from_arrays"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.from_arrays</span></code></a>(arrays[, sortorder, …])</p></td>
<td><p>Convert arrays to MultiIndex.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.from_tuples.html#pyspark.pandas.MultiIndex.from_tuples" title="pyspark.pandas.MultiIndex.from_tuples"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.from_tuples</span></code></a>(tuples[, sortorder, …])</p></td>
<td><p>Convert list of tuples to MultiIndex.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.from_product.html#pyspark.pandas.MultiIndex.from_product" title="pyspark.pandas.MultiIndex.from_product"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.from_product</span></code></a>(iterables[, …])</p></td>
<td><p>Make a MultiIndex from the cartesian product of multiple iterables.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.from_frame.html#pyspark.pandas.MultiIndex.from_frame" title="pyspark.pandas.MultiIndex.from_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.from_frame</span></code></a>(df[, names])</p></td>
<td><p>Make a MultiIndex from a DataFrame.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-properties">
<h3>MultiIndex Properties<a class="headerlink" href="#multiindex-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.MultiIndex.has_duplicates.html#pyspark.pandas.MultiIndex.has_duplicates" title="pyspark.pandas.MultiIndex.has_duplicates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.has_duplicates</span></code></a></p></td>
<td><p>If index has duplicates, return True, otherwise False.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.hasnans.html#pyspark.pandas.MultiIndex.hasnans" title="pyspark.pandas.MultiIndex.hasnans"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.hasnans</span></code></a></p></td>
<td><p>Return True if it has any missing values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.inferred_type.html#pyspark.pandas.MultiIndex.inferred_type" title="pyspark.pandas.MultiIndex.inferred_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.inferred_type</span></code></a></p></td>
<td><p>Return a string of the type inferred from the values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.is_all_dates.html#pyspark.pandas.MultiIndex.is_all_dates" title="pyspark.pandas.MultiIndex.is_all_dates"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.is_all_dates</span></code></a></p></td>
<td><p>is_all_dates always returns False for MultiIndex</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.shape.html#pyspark.pandas.MultiIndex.shape" title="pyspark.pandas.MultiIndex.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.shape</span></code></a></p></td>
<td><p>Return a tuple of the shape of the underlying data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.names.html#pyspark.pandas.MultiIndex.names" title="pyspark.pandas.MultiIndex.names"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.names</span></code></a></p></td>
<td><p>Return names of the Index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.ndim.html#pyspark.pandas.MultiIndex.ndim" title="pyspark.pandas.MultiIndex.ndim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.ndim</span></code></a></p></td>
<td><p>Return an int representing the number of array dimensions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.empty.html#pyspark.pandas.MultiIndex.empty" title="pyspark.pandas.MultiIndex.empty"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.empty</span></code></a></p></td>
<td><p>Returns true if the current object is empty.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.T.html#pyspark.pandas.MultiIndex.T" title="pyspark.pandas.MultiIndex.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.T</span></code></a></p></td>
<td><p>Return the transpose, For index, It will be index itself.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.size.html#pyspark.pandas.MultiIndex.size" title="pyspark.pandas.MultiIndex.size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.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.MultiIndex.nlevels.html#pyspark.pandas.MultiIndex.nlevels" title="pyspark.pandas.MultiIndex.nlevels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.nlevels</span></code></a></p></td>
<td><p>Number of levels in Index &amp; MultiIndex.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.levshape.html#pyspark.pandas.MultiIndex.levshape" title="pyspark.pandas.MultiIndex.levshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.levshape</span></code></a></p></td>
<td><p>A tuple with the length of each level.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.values.html#pyspark.pandas.MultiIndex.values" title="pyspark.pandas.MultiIndex.values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.values</span></code></a></p></td>
<td><p>Return an array representing the data in the Index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.dtypes.html#pyspark.pandas.MultiIndex.dtypes" title="pyspark.pandas.MultiIndex.dtypes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.dtypes</span></code></a></p></td>
<td><p>Return the dtypes as a Series for the underlying MultiIndex.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-components">
<h3>MultiIndex components<a class="headerlink" href="#multiindex-components" 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.MultiIndex.swaplevel.html#pyspark.pandas.MultiIndex.swaplevel" title="pyspark.pandas.MultiIndex.swaplevel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.swaplevel</span></code></a>([i, j])</p></td>
<td><p>Swap level i with level j.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1">
<h3>MultiIndex components<a class="headerlink" href="#id1" 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.MultiIndex.droplevel.html#pyspark.pandas.MultiIndex.droplevel" title="pyspark.pandas.MultiIndex.droplevel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.droplevel</span></code></a>(level)</p></td>
<td><p>Return index with requested level(s) removed.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-missing-values">
<h3>MultiIndex Missing Values<a class="headerlink" href="#multiindex-missing-values" 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.MultiIndex.fillna.html#pyspark.pandas.MultiIndex.fillna" title="pyspark.pandas.MultiIndex.fillna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.fillna</span></code></a>(value)</p></td>
<td><p>Fill NA/NaN values with the specified value.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.dropna.html#pyspark.pandas.MultiIndex.dropna" title="pyspark.pandas.MultiIndex.dropna"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.dropna</span></code></a>()</p></td>
<td><p>Return Index or MultiIndex without NA/NaN values</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-modifying-and-computations">
<h3>MultiIndex Modifying and computations<a class="headerlink" href="#multiindex-modifying-and-computations" 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.MultiIndex.equals.html#pyspark.pandas.MultiIndex.equals" title="pyspark.pandas.MultiIndex.equals"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.equals</span></code></a>(other)</p></td>
<td><p>Determine if two Index objects contain the same elements.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.equal_levels.html#pyspark.pandas.MultiIndex.equal_levels" title="pyspark.pandas.MultiIndex.equal_levels"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.equal_levels</span></code></a>(other)</p></td>
<td><p>Return True if the levels of both MultiIndex objects are the same</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.identical.html#pyspark.pandas.MultiIndex.identical" title="pyspark.pandas.MultiIndex.identical"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.identical</span></code></a>(other)</p></td>
<td><p>Similar to equals, but check that other comparable attributes are also equal.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.insert.html#pyspark.pandas.MultiIndex.insert" title="pyspark.pandas.MultiIndex.insert"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.insert</span></code></a>(loc, item)</p></td>
<td><p>Make new MultiIndex inserting new item at location.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.drop.html#pyspark.pandas.MultiIndex.drop" title="pyspark.pandas.MultiIndex.drop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.drop</span></code></a>(codes[, level])</p></td>
<td><p>Make new MultiIndex with passed list of labels deleted</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.copy.html#pyspark.pandas.MultiIndex.copy" title="pyspark.pandas.MultiIndex.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.copy</span></code></a>([deep])</p></td>
<td><p>Make a copy of this object.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.delete.html#pyspark.pandas.MultiIndex.delete" title="pyspark.pandas.MultiIndex.delete"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.delete</span></code></a>(loc)</p></td>
<td><p>Make new Index with passed location(-s) deleted.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.rename.html#pyspark.pandas.MultiIndex.rename" title="pyspark.pandas.MultiIndex.rename"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.rename</span></code></a>(name[, inplace])</p></td>
<td><p>Alter Index or MultiIndex name.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.repeat.html#pyspark.pandas.MultiIndex.repeat" title="pyspark.pandas.MultiIndex.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.repeat</span></code></a>(repeats)</p></td>
<td><p>Repeat elements of a Index/MultiIndex.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.take.html#pyspark.pandas.MultiIndex.take" title="pyspark.pandas.MultiIndex.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.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.MultiIndex.unique.html#pyspark.pandas.MultiIndex.unique" title="pyspark.pandas.MultiIndex.unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.unique</span></code></a>([level])</p></td>
<td><p>Return unique values in the index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.min.html#pyspark.pandas.MultiIndex.min" title="pyspark.pandas.MultiIndex.min"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.min</span></code></a>()</p></td>
<td><p>Return the minimum value of the Index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.max.html#pyspark.pandas.MultiIndex.max" title="pyspark.pandas.MultiIndex.max"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.max</span></code></a>()</p></td>
<td><p>Return the maximum value of the Index.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.value_counts.html#pyspark.pandas.MultiIndex.value_counts" title="pyspark.pandas.MultiIndex.value_counts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.value_counts</span></code></a>([normalize, sort, …])</p></td>
<td><p>Return a Series containing counts of unique values.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-combining-joining-set-operations">
<h3>MultiIndex Combining / joining / set operations<a class="headerlink" href="#multiindex-combining-joining-set-operations" 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.MultiIndex.append.html#pyspark.pandas.MultiIndex.append" title="pyspark.pandas.MultiIndex.append"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.append</span></code></a>(other)</p></td>
<td><p>Append a collection of Index options together.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.intersection.html#pyspark.pandas.MultiIndex.intersection" title="pyspark.pandas.MultiIndex.intersection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.intersection</span></code></a>(other)</p></td>
<td><p>Form the intersection of two Index objects.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.union.html#pyspark.pandas.MultiIndex.union" title="pyspark.pandas.MultiIndex.union"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.union</span></code></a>(other[, sort])</p></td>
<td><p>Form the union of two Index objects.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.difference.html#pyspark.pandas.MultiIndex.difference" title="pyspark.pandas.MultiIndex.difference"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.difference</span></code></a>(other[, sort])</p></td>
<td><p>Return a new Index with elements from the index that are not in <cite>other</cite>.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.symmetric_difference.html#pyspark.pandas.MultiIndex.symmetric_difference" title="pyspark.pandas.MultiIndex.symmetric_difference"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.symmetric_difference</span></code></a>(other[, …])</p></td>
<td><p>Compute the symmetric difference of two MultiIndex objects.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="multiindex-conversion">
<h3>MultiIndex Conversion<a class="headerlink" href="#multiindex-conversion" 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.MultiIndex.astype.html#pyspark.pandas.MultiIndex.astype" title="pyspark.pandas.MultiIndex.astype"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.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.MultiIndex.item.html#pyspark.pandas.MultiIndex.item" title="pyspark.pandas.MultiIndex.item"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.item</span></code></a>()</p></td>
<td><p>Return the first element of the underlying data as a python tuple.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.to_list.html#pyspark.pandas.MultiIndex.to_list" title="pyspark.pandas.MultiIndex.to_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.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.MultiIndex.to_series.html#pyspark.pandas.MultiIndex.to_series" title="pyspark.pandas.MultiIndex.to_series"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.to_series</span></code></a>([name])</p></td>
<td><p>Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.to_frame.html#pyspark.pandas.MultiIndex.to_frame" title="pyspark.pandas.MultiIndex.to_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.to_frame</span></code></a>([index, name])</p></td>
<td><p>Create a DataFrame with the levels of the MultiIndex as columns.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.view.html#pyspark.pandas.MultiIndex.view" title="pyspark.pandas.MultiIndex.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.view</span></code></a>()</p></td>
<td><p>this is defined as a copy with the same identity</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.to_numpy.html#pyspark.pandas.MultiIndex.to_numpy" title="pyspark.pandas.MultiIndex.to_numpy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.to_numpy</span></code></a>([dtype, copy])</p></td>
<td><p>A NumPy ndarray representing the values in this Index or MultiIndex.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="multiindex-spark-related">
<h2>MultiIndex Spark-related<a class="headerlink" href="#multiindex-spark-related" title="Permalink to this headline"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">MultiIndex.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">MultiIndex.spark.&lt;function/property&gt;</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.MultiIndex.spark.data_type.html#pyspark.pandas.MultiIndex.spark.data_type" title="pyspark.pandas.MultiIndex.spark.data_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.spark.data_type</span></code></a></p></td>
<td><p>Returns the data type as defined by Spark, as a Spark DataType object.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.spark.column.html#pyspark.pandas.MultiIndex.spark.column" title="pyspark.pandas.MultiIndex.spark.column"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.spark.column</span></code></a></p></td>
<td><p>Spark Column object representing the Series/Index.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.MultiIndex.spark.transform.html#pyspark.pandas.MultiIndex.spark.transform" title="pyspark.pandas.MultiIndex.spark.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.spark.transform</span></code></a>(func)</p></td>
<td><p>Applies a function that takes and returns a Spark column.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="multiindex-sorting">
<h3>MultiIndex Sorting<a class="headerlink" href="#multiindex-sorting" 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.MultiIndex.sort_values.html#pyspark.pandas.MultiIndex.sort_values" title="pyspark.pandas.MultiIndex.sort_values"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiIndex.sort_values</span></code></a>([ascending])</p></td>
<td><p>Return a sorted copy of the index.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="datatimeindex">
<span id="api-datetimes"></span><h2>DatatimeIndex<a class="headerlink" href="#datatimeindex" 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.DatetimeIndex.html#pyspark.pandas.DatetimeIndex" title="pyspark.pandas.DatetimeIndex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex</span></code></a></p></td>
<td><p>Immutable ndarray-like of datetime64 data.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="time-date-components">
<h3>Time/date components<a class="headerlink" href="#time-date-components" 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.DatetimeIndex.year.html#pyspark.pandas.DatetimeIndex.year" title="pyspark.pandas.DatetimeIndex.year"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.year</span></code></a></p></td>
<td><p>The year of the datetime.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.month.html#pyspark.pandas.DatetimeIndex.month" title="pyspark.pandas.DatetimeIndex.month"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.month</span></code></a></p></td>
<td><p>The month of the timestamp as January = 1 December = 12.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.day.html#pyspark.pandas.DatetimeIndex.day" title="pyspark.pandas.DatetimeIndex.day"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.day</span></code></a></p></td>
<td><p>The days of the datetime.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.hour.html#pyspark.pandas.DatetimeIndex.hour" title="pyspark.pandas.DatetimeIndex.hour"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.hour</span></code></a></p></td>
<td><p>The hours of the datetime.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.minute.html#pyspark.pandas.DatetimeIndex.minute" title="pyspark.pandas.DatetimeIndex.minute"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.minute</span></code></a></p></td>
<td><p>The minutes of the datetime.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.second.html#pyspark.pandas.DatetimeIndex.second" title="pyspark.pandas.DatetimeIndex.second"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.second</span></code></a></p></td>
<td><p>The seconds of the datetime.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.microsecond.html#pyspark.pandas.DatetimeIndex.microsecond" title="pyspark.pandas.DatetimeIndex.microsecond"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.microsecond</span></code></a></p></td>
<td><p>The microseconds of the datetime.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.week.html#pyspark.pandas.DatetimeIndex.week" title="pyspark.pandas.DatetimeIndex.week"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.week</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.DatetimeIndex.weekofyear.html#pyspark.pandas.DatetimeIndex.weekofyear" title="pyspark.pandas.DatetimeIndex.weekofyear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.weekofyear</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.DatetimeIndex.dayofweek.html#pyspark.pandas.DatetimeIndex.dayofweek" title="pyspark.pandas.DatetimeIndex.dayofweek"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.dayofweek</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.DatetimeIndex.day_of_week.html#pyspark.pandas.DatetimeIndex.day_of_week" title="pyspark.pandas.DatetimeIndex.day_of_week"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.day_of_week</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.DatetimeIndex.weekday.html#pyspark.pandas.DatetimeIndex.weekday" title="pyspark.pandas.DatetimeIndex.weekday"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.dayofyear.html#pyspark.pandas.DatetimeIndex.dayofyear" title="pyspark.pandas.DatetimeIndex.dayofyear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.day_of_year.html#pyspark.pandas.DatetimeIndex.day_of_year" title="pyspark.pandas.DatetimeIndex.day_of_year"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.day_of_year</span></code></a></p></td>
<td><p>The ordinal day of the year.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.quarter.html#pyspark.pandas.DatetimeIndex.quarter" title="pyspark.pandas.DatetimeIndex.quarter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.quarter</span></code></a></p></td>
<td><p>The quarter of the date.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_month_start.html#pyspark.pandas.DatetimeIndex.is_month_start" title="pyspark.pandas.DatetimeIndex.is_month_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_month_end.html#pyspark.pandas.DatetimeIndex.is_month_end" title="pyspark.pandas.DatetimeIndex.is_month_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_quarter_start.html#pyspark.pandas.DatetimeIndex.is_quarter_start" title="pyspark.pandas.DatetimeIndex.is_quarter_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_quarter_end.html#pyspark.pandas.DatetimeIndex.is_quarter_end" title="pyspark.pandas.DatetimeIndex.is_quarter_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_year_start.html#pyspark.pandas.DatetimeIndex.is_year_start" title="pyspark.pandas.DatetimeIndex.is_year_start"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_year_end.html#pyspark.pandas.DatetimeIndex.is_year_end" title="pyspark.pandas.DatetimeIndex.is_year_end"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.is_leap_year.html#pyspark.pandas.DatetimeIndex.is_leap_year" title="pyspark.pandas.DatetimeIndex.is_leap_year"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.daysinmonth.html#pyspark.pandas.DatetimeIndex.daysinmonth" title="pyspark.pandas.DatetimeIndex.daysinmonth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.daysinmonth</span></code></a></p></td>
<td><p>The number of days in the month.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.days_in_month.html#pyspark.pandas.DatetimeIndex.days_in_month" title="pyspark.pandas.DatetimeIndex.days_in_month"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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="id2">
<h3>Selecting<a class="headerlink" href="#id2" 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.DatetimeIndex.indexer_between_time.html#pyspark.pandas.DatetimeIndex.indexer_between_time" title="pyspark.pandas.DatetimeIndex.indexer_between_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.indexer_between_time</span></code></a>(…[, …])</p></td>
<td><p>Return index locations of values between particular times of day (example: 9:00-9:30AM).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.indexer_at_time.html#pyspark.pandas.DatetimeIndex.indexer_at_time" title="pyspark.pandas.DatetimeIndex.indexer_at_time"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.indexer_at_time</span></code></a>(time[, asof])</p></td>
<td><p>Return index locations of values at particular time of day (example: 9:30AM).</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id3">
<h3>Time-specific operations<a class="headerlink" href="#id3" 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.DatetimeIndex.normalize.html#pyspark.pandas.DatetimeIndex.normalize" title="pyspark.pandas.DatetimeIndex.normalize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.strftime.html#pyspark.pandas.DatetimeIndex.strftime" title="pyspark.pandas.DatetimeIndex.strftime"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.strftime</span></code></a>(date_format)</p></td>
<td><p>Convert to a string Index using specified date_format.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.round.html#pyspark.pandas.DatetimeIndex.round" title="pyspark.pandas.DatetimeIndex.round"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.floor.html#pyspark.pandas.DatetimeIndex.floor" title="pyspark.pandas.DatetimeIndex.floor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.ceil.html#pyspark.pandas.DatetimeIndex.ceil" title="pyspark.pandas.DatetimeIndex.ceil"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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.DatetimeIndex.month_name.html#pyspark.pandas.DatetimeIndex.month_name" title="pyspark.pandas.DatetimeIndex.month_name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.month_name</span></code></a>([locale])</p></td>
<td><p>Return the month names of the DatetimeIndex with specified locale.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.DatetimeIndex.day_name.html#pyspark.pandas.DatetimeIndex.day_name" title="pyspark.pandas.DatetimeIndex.day_name"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DatetimeIndex.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="timedeltaindex">
<h2>TimedeltaIndex<a class="headerlink" href="#timedeltaindex" 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.TimedeltaIndex.html#pyspark.pandas.TimedeltaIndex" title="pyspark.pandas.TimedeltaIndex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimedeltaIndex</span></code></a></p></td>
<td><p>Immutable ndarray-like of timedelta64 data, represented internally as int64, and which can be boxed to timedelta objects.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="components">
<h3>Components<a class="headerlink" href="#components" 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.TimedeltaIndex.days.html#pyspark.pandas.TimedeltaIndex.days" title="pyspark.pandas.TimedeltaIndex.days"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimedeltaIndex.days</span></code></a></p></td>
<td><p>Number of days for each element.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="api/pyspark.pandas.TimedeltaIndex.seconds.html#pyspark.pandas.TimedeltaIndex.seconds" title="pyspark.pandas.TimedeltaIndex.seconds"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimedeltaIndex.seconds</span></code></a></p></td>
<td><p>Number of seconds (&gt;= 0 and less than 1 day) for each element.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="api/pyspark.pandas.TimedeltaIndex.microseconds.html#pyspark.pandas.TimedeltaIndex.microseconds" title="pyspark.pandas.TimedeltaIndex.microseconds"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimedeltaIndex.microseconds</span></code></a></p></td>
<td><p>Number of microseconds (&gt;= 0 and less than 1 second) for each element.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class='prev-next-bottom'>
<a class='left-prev' id="prev-link" href="api/pyspark.pandas.DataFrame.pandas_on_spark.transform_batch.html" title="previous page">pyspark.pandas.DataFrame.pandas_on_spark.transform_batch</a>
<a class='right-next' id="next-link" href="api/pyspark.pandas.Index.html" title="next page">pyspark.pandas.Index</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>
&copy; Copyright .<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.<br/>
</p>
</div>
</footer>
</body>
</html>