Browse Source

Pandas

pull/83/head
Jure Šorn 4 years ago
parent
commit
f98d6ac84c
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -3182,7 +3182,7 @@ b 3 4
```python
<DF> = <DF>.set_index(column_key) # Replaces row keys with values from a column.
<DF> = <DF>.reset_index() # Moves row keys to their own column.
<DF> = <DF>.reset_index() # Moves row keys to column named index.
<DF> = <DF>.filter('<regex>', axis=1) # Only keeps columns whose key matches the regex.
<DF> = <DF>.melt(id_vars=column_key/s) # Converts DF from wide to long format.
```

2
index.html

@ -2710,7 +2710,7 @@ b <span class="hljs-number">3</span> <span class="hljs-number">4</span>
&lt;DF&gt; = &lt;DF&gt; +-*/ &lt;el/Sr/DF&gt; <span class="hljs-comment"># Items with non-matching keys get value NaN.</span>
</code></pre>
<pre><code class="python language-python hljs">&lt;DF&gt; = &lt;DF&gt;.set_index(column_key) <span class="hljs-comment"># Replaces row keys with values from a column.</span>
&lt;DF&gt; = &lt;DF&gt;.reset_index() <span class="hljs-comment"># Moves row keys to their own column.</span>
&lt;DF&gt; = &lt;DF&gt;.reset_index() <span class="hljs-comment"># Moves row keys to column named index.</span>
&lt;DF&gt; = &lt;DF&gt;.filter(<span class="hljs-string">'&lt;regex&gt;'</span>, axis=<span class="hljs-number">1</span>) <span class="hljs-comment"># Only keeps columns whose key matches the regex.</span>
&lt;DF&gt; = &lt;DF&gt;.melt(id_vars=column_key/s) <span class="hljs-comment"># Converts DF from wide to long format.</span>
</code></pre>

Loading…
Cancel
Save