Skip to content

Commit 9488b1d

Browse files
committed
Pandas
1 parent e8d514b commit 9488b1d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ with <conn>: # Exits the block with commit() o
19181918
<conn>.execute('<query>', <dict/namedtuple>) # Replaces ':<key>'s with values.
19191919
<conn>.executemany('<query>', <coll_of_coll>) # Runs execute() multiple times.
19201920
```
1921-
* **Passed values can be of type str, int, float, bytes, None, or bool (stored as 1 or 0).**
1921+
* **Passed values can be of type str, int, float, bytes, None, or bool (stored as 0 or 1).**
19221922

19231923
### Example
19241924
**Values are not actually saved in this example because `'conn.commit()'` is omitted!**
@@ -2835,7 +2835,7 @@ from PIL import ImageDraw
28352835
<Draw>.rectangle((x1, y1, x2, y2)) # Also rounded_rectangle(), regular_polygon().
28362836
<Draw>.polygon((x1, y1, x2, y2, ...)) # Last point gets connected to the first.
28372837
<Draw>.ellipse((x1, y1, x2, y2)) # To rotate use Image's rotate() and paste().
2838-
<Draw>.text((x, y), <str>, font=<Font>) # `<Font> = ImageFont.truetype(<path>, size)`
2838+
<Draw>.text((x, y), <str>, font=<Font>) # `<Font> = ImageFont.truetype(<path>, size)`.
28392839
```
28402840
* **Use `'fill=<color>'` to set the primary color.**
28412841
* **Use `'width=<int>'` to set the width of lines or contours.**
@@ -3348,7 +3348,7 @@ c 6 7
33483348
<DF> = <DF>.xs(row_keys, level=<ints>) # Rows that have first key on first level, etc.
33493349
<DF> = <DF>.set_index(col_keys) # Combines multiple columns into a multi-index.
33503350
<S/DF> = <DF>.stack/unstack(level=-1) # Combines col keys with row keys or vice versa.
3351-
<DF> = <DF>.pivot_table(index=col_key/s, …) # `columns=key/s, values=key/s, aggfunc='mean'`.
3351+
<DF> = <DF>.pivot_table(index=col_key/s) # `columns=key/s, values=key/s, aggfunc='mean'`.
33523352
```
33533353

33543354
#### DataFrame — Encode, Decode:

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@
15871587
</code></pre></div>
15881588

15891589
<ul>
1590-
<li><strong>Passed values can be of type str, int, float, bytes, None, or bool (stored as 1 or 0).</strong></li>
1590+
<li><strong>Passed values can be of type str, int, float, bytes, None, or bool (stored as 0 or 1).</strong></li>
15911591
</ul>
15921592
<div><h3 id="example-1">Example</h3><p><strong>Values are not actually saved in this example because <code class="python hljs"><span class="hljs-string">'conn.commit()'</span></code> is omitted!</strong></p><pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span>conn = sqlite3.connect(<span class="hljs-string">'test.db'</span>)
15931593
<span class="hljs-meta">&gt;&gt;&gt; </span>conn.execute(<span class="hljs-string">'CREATE TABLE person (person_id INTEGER PRIMARY KEY, name, height)'</span>)
@@ -2308,7 +2308,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
23082308
&lt;Draw&gt;.rectangle((x1, y1, x2, y2)) <span class="hljs-comment"># Also rounded_rectangle(), regular_polygon().</span>
23092309
&lt;Draw&gt;.polygon((x1, y1, x2, y2, ...)) <span class="hljs-comment"># Last point gets connected to the first.</span>
23102310
&lt;Draw&gt;.ellipse((x1, y1, x2, y2)) <span class="hljs-comment"># To rotate use Image's rotate() and paste().</span>
2311-
&lt;Draw&gt;.text((x, y), &lt;str&gt;, font=&lt;Font&gt;) <span class="hljs-comment"># `&lt;Font&gt; = ImageFont.truetype(&lt;path&gt;, size)`</span>
2311+
&lt;Draw&gt;.text((x, y), &lt;str&gt;, font=&lt;Font&gt;) <span class="hljs-comment"># `&lt;Font&gt; = ImageFont.truetype(&lt;path&gt;, size)`.</span>
23122312
</code></pre></div>
23132313

23142314
<ul>
@@ -2726,7 +2726,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
27262726
&lt;DF&gt; = &lt;DF&gt;.xs(row_keys, level=&lt;ints&gt;) <span class="hljs-comment"># Rows that have first key on first level, etc.</span>
27272727
&lt;DF&gt; = &lt;DF&gt;.set_index(col_keys) <span class="hljs-comment"># Combines multiple columns into a multi-index.</span>
27282728
&lt;S/DF&gt; = &lt;DF&gt;.stack/unstack(level=<span class="hljs-number">-1</span>) <span class="hljs-comment"># Combines col keys with row keys or vice versa.</span>
2729-
&lt;DF&gt; = &lt;DF&gt;.pivot_table(index=col_key/s, …) <span class="hljs-comment"># `columns=key/s, values=key/s, aggfunc='mean'`.</span>
2729+
&lt;DF&gt; = &lt;DF&gt;.pivot_table(index=col_key/s) <span class="hljs-comment"># `columns=key/s, values=key/s, aggfunc='mean'`.</span>
27302730
</code></pre></div>
27312731

27322732
<div><h4 id="dataframeencodedecode">DataFrame — Encode, Decode:</h4><pre><code class="python language-python hljs">&lt;DF&gt; = pd.read_json/html(<span class="hljs-string">'&lt;str/path/url&gt;'</span>) <span class="hljs-comment"># Run `$ pip3 install beautifulsoup4 lxml`.</span>

0 commit comments

Comments
 (0)