From 9488b1dfa774b054f5e7d3bf65fe14e364da3d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 26 Nov 2024 13:23:32 +0100 Subject: [PATCH] Pandas --- README.md | 6 +++--- index.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f922564..3266166 100644 --- a/README.md +++ b/README.md @@ -1918,7 +1918,7 @@ with : # Exits the block with commit() o .execute('', ) # Replaces ':'s with values. .executemany('', ) # Runs execute() multiple times. ``` -* **Passed values can be of type str, int, float, bytes, None, or bool (stored as 1 or 0).** +* **Passed values can be of type str, int, float, bytes, None, or bool (stored as 0 or 1).** ### Example **Values are not actually saved in this example because `'conn.commit()'` is omitted!** @@ -2835,7 +2835,7 @@ from PIL import ImageDraw .rectangle((x1, y1, x2, y2)) # Also rounded_rectangle(), regular_polygon(). .polygon((x1, y1, x2, y2, ...)) # Last point gets connected to the first. .ellipse((x1, y1, x2, y2)) # To rotate use Image's rotate() and paste(). -.text((x, y), , font=) # ` = ImageFont.truetype(, size)` +.text((x, y), , font=) # ` = ImageFont.truetype(, size)`. ``` * **Use `'fill='` to set the primary color.** * **Use `'width='` to set the width of lines or contours.** @@ -3348,7 +3348,7 @@ c 6 7 = .xs(row_keys, level=) # Rows that have first key on first level, etc. = .set_index(col_keys) # Combines multiple columns into a multi-index. = .stack/unstack(level=-1) # Combines col keys with row keys or vice versa. - = .pivot_table(index=col_key/s, …) # `columns=key/s, values=key/s, aggfunc='mean'`. + = .pivot_table(index=col_key/s) # `columns=key/s, values=key/s, aggfunc='mean'`. ``` #### DataFrame — Encode, Decode: diff --git a/index.html b/index.html index 6efb673..f206fa8 100644 --- a/index.html +++ b/index.html @@ -1587,7 +1587,7 @@ CompletedProcess(args=['bc', Example

Values are not actually saved in this example because 'conn.commit()' is omitted!

>>> conn = sqlite3.connect('test.db')
 >>> conn.execute('CREATE TABLE person (person_id INTEGER PRIMARY KEY, name, height)')
@@ -2308,7 +2308,7 @@ img.show()
 <Draw>.rectangle((x1, y1, x2, y2))              # Also rounded_rectangle(), regular_polygon().
 <Draw>.polygon((x1, y1, x2, y2, ...))           # Last point gets connected to the first.
 <Draw>.ellipse((x1, y1, x2, y2))                # To rotate use Image's rotate() and paste().
-<Draw>.text((x, y), <str>, font=<Font>)         # `<Font> = ImageFont.truetype(<path>, size)`
+<Draw>.text((x, y), <str>, font=<Font>)         # `<Font> = ImageFont.truetype(<path>, size)`.
 
    @@ -2726,7 +2726,7 @@ c 6 7 <DF> = <DF>.xs(row_keys, level=<ints>) # Rows that have first key on first level, etc. <DF> = <DF>.set_index(col_keys) # Combines multiple columns into a multi-index. <S/DF> = <DF>.stack/unstack(level=-1) # Combines col keys with row keys or vice versa. -<DF> = <DF>.pivot_table(index=col_key/s, …) # `columns=key/s, values=key/s, aggfunc='mean'`. +<DF> = <DF>.pivot_table(index=col_key/s) # `columns=key/s, values=key/s, aggfunc='mean'`.

    DataFrame — Encode, Decode:

    <DF> = pd.read_json/html('<str/path/url>')     # Run `$ pip3 install beautifulsoup4 lxml`.