You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chapter5/visualization.ipynb
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2385,7 +2385,7 @@
2385
2385
},
2386
2386
{
2387
2387
"cell_type": "markdown",
2388
-
"id": "64d4c861",
2388
+
"id": "b0ad6f37",
2389
2389
"metadata": {},
2390
2390
"source": [
2391
2391
"### Lux: A Python API for Intelligent Visual Discovery"
@@ -2411,14 +2411,14 @@
2411
2411
},
2412
2412
{
2413
2413
"cell_type": "markdown",
2414
-
"id": "520b2b71",
2414
+
"id": "39cc1243",
2415
2415
"metadata": {},
2416
2416
"source": [
2417
2417
"Have you ever taken a while to come up with the visualizations for your data? Wouldn't it be nice if you can get some suggestions on what to visualize?\n",
2418
2418
"\n",
2419
2419
"That is when Lux comes in handy. Lux is a Python library that makes it fast and easy to explore data. \n",
2420
2420
"\n",
2421
-
"After lux is imported, you will get a set of visualizations when printing your DataFrame."
2421
+
"After Lux is imported, you will get a set of visualizations when printing your DataFrame."
2422
2422
]
2423
2423
},
2424
2424
{
@@ -2442,7 +2442,7 @@
2442
2442
{
2443
2443
"cell_type": "code",
2444
2444
"execution_count": 22,
2445
-
"id": "b45172f0",
2445
+
"id": "84e10460",
2446
2446
"metadata": {
2447
2447
"ExecuteTime": {
2448
2448
"end_time": "2022-04-18T13:34:55.540509Z",
@@ -2545,15 +2545,15 @@
2545
2545
},
2546
2546
{
2547
2547
"cell_type": "markdown",
2548
-
"id": "fa03dd13",
2548
+
"id": "ffb454c1",
2549
2549
"metadata": {},
2550
2550
"source": [
2551
2551
""
2552
2552
]
2553
2553
},
2554
2554
{
2555
2555
"cell_type": "markdown",
2556
-
"id": "d231ea50",
2556
+
"id": "d7252f38",
2557
2557
"metadata": {},
2558
2558
"source": [
2559
2559
"[Link to Lux](https://github.com/lux-org/lux)."
<h2><spanclass="section-number">4.1.3. </span>Apply a Function to a DataFrame Elementwise<aclass="headerlink" href="#apply-a-function-to-a-dataframe-elementwise" title="Permalink to this headline">¶</a></h2>
901
+
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">apply</span></code> method applies a function along an axis of a DataFrame. If you want to apply a function to a DataFrame elementwise, use <codeclass="docutils literal notranslate"><spanclass="pre">applymap</span></code>.</p>
<h2><spanclass="section-number">4.1.3. </span>Assign Values to Multiple New Columns<aclass="headerlink" href="#assign-values-to-multiple-new-columns" title="Permalink to this headline">¶</a></h2>
935
+
<h2><spanclass="section-number">4.1.4. </span>Assign Values to Multiple New Columns<aclass="headerlink" href="#assign-values-to-multiple-new-columns" title="Permalink to this headline">¶</a></h2>
896
936
<p>If you want to assign values to multiple new columns, instead of assigning them separately, you can do everything in one line of code with <codeclass="docutils literal notranslate"><spanclass="pre">df.assign</span></code>.</p>
897
937
<p>In the code below, I first created <codeclass="docutils literal notranslate"><spanclass="pre">col3</span></code> then use <codeclass="docutils literal notranslate"><spanclass="pre">col3</span></code> to create <codeclass="docutils literal notranslate"><spanclass="pre">col4</span></code>. Everything is in one line of code.</p>
898
938
<divclass="cell docutils container">
@@ -954,7 +994,7 @@ <h2><span class="section-number">4.1.3. </span>Assign Values to Multiple New Col
<h2><spanclass="section-number">4.1.4. </span>pandas.Series.map: Change Values of a Pandas Series Using a Dictionary<aclass="headerlink" href="#pandas-series-map-change-values-of-a-pandas-series-using-a-dictionary" title="Permalink to this headline">¶</a></h2>
997
+
<h2><spanclass="section-number">4.1.5. </span>pandas.Series.map: Change Values of a Pandas Series Using a Dictionary<aclass="headerlink" href="#pandas-series-map-change-values-of-a-pandas-series-using-a-dictionary" title="Permalink to this headline">¶</a></h2>
958
998
<p>If you want to change values of a pandas Series using a dictionary, use <codeclass="docutils literal notranslate"><spanclass="pre">pd.Series.map</span></code>.</p>
<h2><spanclass="section-number">4.1.5. </span>pandas.DataFrame.explode: Transform Each Element in an Iterable to a Row<aclass="headerlink" href="#pandas-dataframe-explode-transform-each-element-in-an-iterable-to-a-row" title="Permalink to this headline">¶</a></h2>
1039
+
<h2><spanclass="section-number">4.1.6. </span>pandas.DataFrame.explode: Transform Each Element in an Iterable to a Row<aclass="headerlink" href="#pandas-dataframe-explode-transform-each-element-in-an-iterable-to-a-row" title="Permalink to this headline">¶</a></h2>
1000
1040
<p>When working with <codeclass="docutils literal notranslate"><spanclass="pre">pandas</span><spanclass="pre">DataFrame</span></code>, if you want to transform each element in an iterable to a row, use <codeclass="docutils literal notranslate"><spanclass="pre">explode</span></code>.</p>
<h2><spanclass="section-number">4.1.6. </span>Split a String into Multiple Rows<aclass="headerlink" href="#split-a-string-into-multiple-rows" title="Permalink to this headline">¶</a></h2>
1159
+
<h2><spanclass="section-number">4.1.7. </span>Split a String into Multiple Rows<aclass="headerlink" href="#split-a-string-into-multiple-rows" title="Permalink to this headline">¶</a></h2>
1120
1160
<p>Sometimes, you might have a column whose values are strings representing different items such as <codeclass="docutils literal notranslate"><spanclass="pre">"1,</span><spanclass="pre">2"</span></code>.</p>
1121
1161
<divclass="cell docutils container">
1122
1162
<divclass="cell_input docutils container">
@@ -1269,7 +1309,7 @@ <h2><span class="section-number">4.1.6. </span>Split a String into Multiple Rows
<h2><spanclass="section-number">4.1.7. </span>Forward Fill in pandas: Use the Previous Value to Fill the Current Missing Value<aclass="headerlink" href="#forward-fill-in-pandas-use-the-previous-value-to-fill-the-current-missing-value" title="Permalink to this headline">¶</a></h2>
1312
+
<h2><spanclass="section-number">4.1.8. </span>Forward Fill in pandas: Use the Previous Value to Fill the Current Missing Value<aclass="headerlink" href="#forward-fill-in-pandas-use-the-previous-value-to-fill-the-current-missing-value" title="Permalink to this headline">¶</a></h2>
1273
1313
<p>If you want to use the previous value in a column or a row to fill the current missing value in a pandas DataFrame, use <codeclass="docutils literal notranslate"><spanclass="pre">df.fillna(method=’ffill’)</span></code>. <codeclass="docutils literal notranslate"><spanclass="pre">ffill</span></code> stands for forward fill.</p>
Copy file name to clipboardExpand all lines: docs/Chapter5/visualization.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1893,7 +1893,7 @@ <h2><span class="section-number">6.10.15. </span>Lux: A Python API for Intellige
1893
1893
</div>
1894
1894
<p>Have you ever taken a while to come up with the visualizations for your data? Wouldn’t it be nice if you can get some suggestions on what to visualize?</p>
1895
1895
<p>That is when Lux comes in handy. Lux is a Python library that makes it fast and easy to explore data.</p>
1896
-
<p>After lux is imported, you will get a set of visualizations when printing your DataFrame.</p>
1896
+
<p>After Lux is imported, you will get a set of visualizations when printing your DataFrame.</p>
0 commit comments