<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chandasingh on Medium]]></title>
        <description><![CDATA[Stories by Chandasingh on Medium]]></description>
        <link>https://medium.com/@chandasingh20?source=rss-728ea4770bd5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tiFR4Lroyvv4uDFuP1URGQ.jpeg</url>
            <title>Stories by Chandasingh on Medium</title>
            <link>https://medium.com/@chandasingh20?source=rss-728ea4770bd5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 21:39:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chandasingh20/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Pandas (a Python Library)]]></title>
            <link>https://medium.com/@chandasingh20/pandas-a-python-library-39c1d1f8bb77?source=rss-728ea4770bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/39c1d1f8bb77</guid>
            <dc:creator><![CDATA[Chandasingh]]></dc:creator>
            <pubDate>Thu, 08 Oct 2020 14:22:59 GMT</pubDate>
            <atom:updated>2020-10-08T14:22:59.876Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the most widely used Python libraries in Data Science after NumPy and Matplotlib</p><h4>What is Pandas?</h4><p>The Pandas library Provides:</p><ul><li><em>High-performance</em></li><li><em>Easy-to-use data structures and</em></li><li><em>Data analysis tools</em></li></ul><p>Package built on top of Numpy</p><p>Efficient implementation of dataframes</p><h4>Pandas — DataFrame</h4><p>The main data structure is the DataFrame</p><p>In memory 2D table : Like Spreadsheet with column names and row label</p><h4>Pandas — Data Analysis</h4><p>Many features available in Excel, are available programmatically like:</p><ul><li><em>Creating pivot tables</em></li><li><em>Computing columns based on other columns</em></li><li><em>Plotting graphs</em></li></ul><h4>Pandas — Data Structures</h4><p>Series objects:</p><ul><li><em>1D array, similar to a column in a spreadsheet</em></li></ul><p>DataFrame objects:</p><ul><li><em>2D table, similar to a spreadsheet</em></li></ul><p>Panel objects</p><ul><li><em>Dictionary of DataFrames</em></li></ul><p><strong>Pandas — Series Objects</strong></p><p>Creating a Series</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*0L_Y9sC187daquqhuF-g-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*qAeDqNaThzbUNzvN19GXCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*ar2O-YCKWnLCoMGi49Qc2Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*ZxrLsEhj-I8wz604FppxWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*vpVu8sMBjzz378YB3niVAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*9a_UQhTqJlc47xbbv8n_iQ.png" /></figure><h4>Automatic alignment</h4><ul><li><em>When an operation involves multiple Series objects</em></li><li><em>Pandas automatically aligns items by matching index labels</em></li></ul><p><strong>example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*CwD-14yngGPoKAA5eNtPKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*b9ZQGjereoXKg1iK-1oFBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*MV-7ILpO2meM59ZHO6vKBQ.png" /></figure><p>A DataFrame object represents:</p><ul><li><em>A spreadsheet,</em></li><li><em>With cell values,</em></li><li><em>Column names</em></li><li><em>And row index labels</em></li></ul><p>Visualize DataFrame as dictionaries of Series</p><h4>Creating a DataFrame</h4><p>Pass a dictionary of Series objects</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*GolgRh7KFAfLfaBedL_yrQ.png" /></figure><p>Important Notes</p><ul><li><em>The Series were automatically aligned based on their index</em></li><li><em>Missing values are represented as NaN</em></li><li><em>Series names are ignored (the name “year” was dropped)</em></li></ul><p>Access a column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*wNp-yLA_nSUbfCm5jM-uSw.png" /></figure><p>Access the multiple columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*NO2hl_8-suSNROwLKHFC9g.png" /></figure><p>As you can see above, you have to use [] to access single column [[]] to access double and so on.</p><p>Include columns and/or rows and guarantee order</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*pSDe3-ea4SJEJcS0SNQNAg.png" /></figure><p>Accessing rows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*fxAwnDyKWRzGEFL05EmRXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*IcGKm3LwjLbEr2n4A_5rPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*d7LzOuzkxOINn5bOLZqT1g.png" /></figure><p>Adding and removing columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*ijsldylMtWMLlUw_1wkgVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*h-u2g9ywm5ekja-MswkPPA.png" /></figure><p>A new column must have the same number of rows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*OKBkd7z4Aevq9QvHFJLEbg.png" /></figure><p>Add a new column using insert method after an existing column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*3Wk6WH4CL0G7wc1ztb5PiQ.png" /></figure><p>Add new columns using assign method</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*rUuGkGKl0bTB1rYQafs2tA.png" /></figure><h4><strong>Sorting a DataFrame</strong></h4><p>Use sort_index method:</p><ul><li><em>It sorts the rows by their index label</em></li><li><em>In ascending order</em></li><li><em>Reverse the order by passing ascending=False</em></li><li><em>Returns a sorted copy of DataFrame</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*grrcA8cnaum7M_J-RWv9aQ.png" /></figure><p><strong>Sorting a DataFrame — inplace argument</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*N41SNMtNkdJ4AomDrlZQqw.png" /></figure><p><strong>Sorting a DataFrame — Sort By Value</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*0R2XERaGvjN2LSj-jaI6yg.png" /></figure><p><strong>Plotting a DataFrame</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*PsVy7VfJpRf9cGvOwJB8gw.png" /></figure><p><strong>Saving and Loading</strong></p><p>Pandas can save DataFrames to various backends such as:</p><ul><li><em>CSV</em></li><li><em>Excel (requires openpyxl library)</em></li><li><em>JSON</em></li><li><em>HTML</em></li><li><em>SQL database</em></li></ul><h4>Saving</h4><p>Let’s create a new DataFrame my_df and save it in various formats</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*S_dYPm9QaUI6HlmqiR7pCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*-IjN_6mDzu6pgVMPXJrgZg.png" /></figure><p><strong>What was saved?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*feVjyLHBc0KnrZiiiUXxCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*3RXcdO1h7Zjk_9Y0S3Rm9A.png" /><figcaption>my_df.csv</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*hmN-LLxui1dDm46hgdZfjw.png" /><figcaption>my_df.html</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*h0mujwcx686H_Ws-lZoKtA.png" /><figcaption>my_df.json</figcaption></figure><h4>Loading</h4><ul><li><em>read_csv # For loading CSV files</em></li><li><em>read_html # For loading HTML files</em></li><li><em>read_excel # For loading Excel files</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*Z5IZF1U8eg-eSTeTk0KF5Q.png" /></figure><h4>Overview</h4><p>When dealing with large DataFrames, it is useful to get a quick overview of its content</p><p>Load my_df.csv inside jupyter notebook directory to create a DataFrame and get a quick overview</p><p>Let’s understand below methods</p><ul><li><em>head()</em></li><li><em>tail()</em></li><li><em>info()</em></li><li><em>describe()</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*JmBn9ckhlRw7qOxFturxHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*IPhW98fKqdax_zu4II7OmQ.png" /></figure><h4>describe()</h4><p>The describe method gives a nice overview of the main aggregated values over each column</p><ul><li><em>count: number of non-null (not NaN) values</em></li><li><em>mean: mean of non-null values</em></li><li><em>std: standard deviation of non-null values</em></li><li><em>min: minimum of non-null values</em></li><li><em>25%, 50%, 75%: 25th, 50th and 75th percentile of non-null values</em></li><li><em>max: maximum of non-null values</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*l_YvImQGl0SJqB6R477wGA.png" /></figure><p>See you soon….</p><p>Thanks for reading!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39c1d1f8bb77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reading Web Pages with Python]]></title>
            <link>https://medium.com/@chandasingh20/reading-web-pages-with-python-56f3da463584?source=rss-728ea4770bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/56f3da463584</guid>
            <category><![CDATA[data-folkz]]></category>
            <dc:creator><![CDATA[Chandasingh]]></dc:creator>
            <pubDate>Tue, 06 Oct 2020 06:19:47 GMT</pubDate>
            <atom:updated>2020-10-06T06:19:47.759Z</atom:updated>
            <content:encoded><![CDATA[<h4>Making HTTP Easier With urllib</h4><h4>Using urllib in Python</h4><p>Since HTTP is so common, we have a library urllib (URL Library) that does all the socket work for us and makes web pages look like a file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TsJK6NvKjeR5gGdtbhUmg.png" /></figure><h4>Like a file…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqF5ksNPWY4cDpoqC_7fXw.png" /></figure><h4>Reading Web Pages</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWZGzkdIF7DIXC0z_d7Lbw.png" /></figure><h4>Going from one page to another…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XvA6v4zY-1WX70zHT5EEUw.png" /></figure><p>Happy Learning!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56f3da463584" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NumPy in Python]]></title>
            <link>https://medium.com/@chandasingh20/numpy-in-python-fb9395ed2949?source=rss-728ea4770bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb9395ed2949</guid>
            <category><![CDATA[data-folkz]]></category>
            <dc:creator><![CDATA[Chandasingh]]></dc:creator>
            <pubDate>Fri, 02 Oct 2020 12:26:56 GMT</pubDate>
            <atom:updated>2020-10-20T06:07:58.086Z</atom:updated>
            <content:encoded><![CDATA[<p>NumPy stands for “Numeric Python” or “Numerical Python”. It is an open source module of Python which provides fast mathematical functions. NumPy’s main object is the homogeneous multi-dimensional array.</p><p>It is a table of elements: usually numbers, all of the same type, indexed by a tuple of positive integers. In NumPy dimensions are called axes and the number of axes is rank</p><h4>Why use NumPy ?</h4><ul><li>Array-oriented computing</li><li>Efficiently implemented multi-dimensional arrays</li><li>Designed for scientific computation</li><li>Library of high-level mathematical functions</li></ul><h3>1. Creating Numpy arrays</h3><p>np.array — Creating NumPy array from Python Lists/Tuple</p><p>Numpy arrays can be created from Python lists or tuple in the following way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*vzXtBYsYRADC5sx_WsDgoQ.png" /></figure><h4>np.zeros — An array with all Zeroes</h4><p>To create an array with all zeroes the function np.zeros is used</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*DAxCNhjA6mP7BYHjKY8mYw.png" /></figure><h4>np.ones — An array with all Ones</h4><p>To create an array with all ones the function np.ones is used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*7eG1Ikj5DnDsy-IqRDiclw.png" /></figure><h4>np.full — An array with a given value</h4><p>To create an array with a given shape and a given value np.full is used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*G0o2yyHCZxXrcDcvGTLpsw.png" /></figure><h4>np.arange — Creating sequence of Numbers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*aQReXwgiX-ipvXaUXHLCRA.png" /></figure><h4>np.linspace — Creating an array with evenly distributed numbers</h4><ul><li>Returns an array having a specific number of points</li><li>Evenly distributed between two values</li><li>The maximum value is included, contrary to arange</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*DzxGywdLTx5D_NU5MjagYA.png" /></figure><h4>np.random.rand — Creating an array with random numbers</h4><p>Let us make a 2x3 matrix having random floats between 0 and 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*pd0_kxBvFU9ui6Q9ze14tQ.png" /></figure><h4>np.empty — Creating an empty array</h4><p>To create an uninitialised array with a given shape. Its content is not predictable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*agVjJbEFa8_puj8x-xndfg.png" /></figure><h3>2. Important attributes of a NumPy object</h3><p>The NumPy’s array class is called ndarray (N-dimensional array of rectangular data). The important attributes of a ndarray object are -</p><h4>ndarray.ndim</h4><p>the number of axes (dimensions) of the array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*yaPEgA3Hbv8QoUWavkNkMA.png" /></figure><h4>ndarray.shape</h4><p>the dimensions of the array. This is a tuple of integers indicating the size of the array in each dimension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*EF4Gm3yFQOXYZoYBgeEPYQ.png" /></figure><h4>ndarray.size</h4><p>the total number of elements of the array. This is equal to the product of the elements of shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*mQJYHkc1bOo9XfKWFnE_CA.png" /></figure><h4>ndarray.dtype</h4><p>Tells the datatype of the elements in the numpy array. All the elements in a numpy array have the same type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*gcLRqFYsYB3BGdGitHsvvQ.png" /></figure><h4>ndarray.itemsize</h4><p>The itemsize attribute returns the size (in bytes) of each item:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*CHYQi-Mu4IlQtHBaCcZSwA.png" /></figure><h3>3. Dimensions in NumPy Arrays</h3><p><em>0-D Arrays</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*9REPMfWCeYdrUVXnsdL-LQ.png" /></figure><p><em>1-D Arrays</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*ecvH-mRJRMQWqEuib35QUQ.png" /></figure><p><em>2-D Arrays</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*YZLxllh3pRcwRudfrpLlXw.png" /></figure><p><em>3-D Arrays</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*OCE-ssm-D9ferFUjEIiWlQ.png" /></figure><p><em>Multi-dimensional Arrays</em></p><p>An array can have multiple dimensions. and we can define the number of dimensions in an array by using ndim function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*58KeA7_YzS-tAH39vji4TA.png" /></figure><h3>4. Reshaping Arrays</h3><p>The function reshape is used to reshape the NumPy array. The following example illustrates this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*GyDh_I39zV5g-tqBEMDODw.png" /></figure><h3>5. Indexing and Accessing Arrays</h3><p>Indexing one dimensional NumPy Arrays</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*2GC55_OLBbmMs1zJf11i6Q.png" /></figure><h3>6. Difference with regular Python arrays</h3><ol><li>If you assign a single value to an ndarray slice, it is copied across the whole slice :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*POjl0uz5ok0r1cFSltysMQ.png" /></figure><p>2. ndarray slices are actually views on the same data buffer. If you modify it, it is going to modify the original ndarray as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*zKK_cTxRL469nr9zpZbmsg.png" /></figure><p>3. If you want a copy of the data, you need to use the copy method as another_slice = a[2:6].copy(), if we modify another_slice, a remains same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*WZiizXA_rQS0CAD6lHD_ww.png" /></figure><h3>7. Indexing multi dimensional NumPy arrays</h3><p>Multi-dimensional arrays can be accessed as</p><p>b[1,2] #1 row, 2 columns</p><p>b[1,:] #1 row, all columns</p><p>b[:,1] #all rows, 1 column</p><p>The following format is used while indexing multi-dimensional arrays:</p><p>Array[row_start_index:row_end_index, column_start_index: column_end_index]</p><h4>Boolean Indexing</h4><p>We can also index arrays using an ndarray of boolean values on one axis to specify the indices that we want to access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*Eullju_YlEmFHdyK3gw8rA.png" /></figure><h3>8. Linear Algebra with NumPy</h3><h4>Vectors</h4><ul><li>A vector is a quantity defined by a magnitude and a direction.</li><li>A vector can be represented by an array of numbers called scalars.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*SUyhzi6scIB6f0PmCM5qWw.png" /></figure><h4>Use of Vectors in Machine Learning</h4><ul><li>Vectors have many purposes in Machine Learning, most notably to represent observations and predictions.</li><li>For example, say we built a Machine Learning system to classify videos into three categories (good, spam, clickbait) based on what we know about them.</li><li>For each video, we would have a vector representing what we know about it.</li></ul><p>such as :</p><pre>Video = (10.5, <br>         5.2,<br>         3.25, <br>         7.0)        </pre><ul><li>This vector could represent a video that lasts 10.5 minutes, but only 5.2% viewers watch for more than a minute, it gets 3.25 views per day on an average, and it was flagged 7 times as spam. As you can see, each axis may have a different meaning.</li></ul><pre>class_probabilities = (0.80,<br>                       0.18,                    <br>                       0.02)</pre><ul><li>Based on class_probabilities vector as shown above, our Machine Learning system may predict that there is an 80% probability that it is a spam video, 18% that it is clickbait, and 2% that it is a good video.</li></ul><h3>9. Basic Operations on NumPy arrays</h3><h4><strong>Addition in NumPy arrays</strong></h4><p>Addition can be performed on NumPy arrays as shown below. They apply element wise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*EBAT5o7XiCFQFOdHTqiPyQ.png" /></figure><h4>Subtraction in NumPy arrays</h4><p>Subtraction can be performed on NumPy arrays as shown below. They apply element wise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*4f8eW_nNuKcNKm1oY_izfg.png" /></figure><h4>Element wise product in NumPy arrays</h4><p>Element wise product can be performed on NumPy arrays as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*NVWc0w6Gk_JoDc9YJjvUVQ.png" /></figure><h4>Matrix Product in NumPy arrays</h4><p>Matrix product can be performed on NumPy arrays as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*yuKygQLVMBSJt8Vo1-IfmA.png" /></figure><h4>Division in NumPy arrays</h4><p>Division can be performed on NumPy arrays as shown below. They apply element wise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*sk9fjZWz69u8iZnLqfCMbg.png" /></figure><h4>Integer Division in NumPy arrays</h4><p>Division can be performed on NumPy arrays as shown below. They apply element wise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*7ZWI9OXhvS50iXVzK_QbBQ.png" /></figure><h4>Modulus in NumPy arrays</h4><p>Modulus operator can be applied on NumPy arrays as shown below. They apply element wise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*vUXLdrFnxPQ0Nk_BxcFRsA.png" /></figure><h4>Exponents in NumPy arrays</h4><p>We can find the exponent of each element in a NumPy array in the following way. It is applied element wise.Conditional Operators on NumPy arrays</p><p>Conditional operators are also applied element-wise</p><h4>Conditional Operators on NumPy arrays</h4><p>Conditional operators are also applied element-wise</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*HXOZBtBBgGUjsKjPA8Hfnw.png" /></figure><h3>10. Mathematical and statistical functions on NumPy arrays</h3><h4>Statistical functions of NumPy array elements</h4><p>The ndarray object has methods mean(), min(), max(), sum(), prod(), std() and var() which finds the mean of all the elements in the array regardless of the shape of the numpy array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*s_GorgCum9zhHd4keaJDLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*MsyG57mH6hIKQdS7ttdwHA.png" /></figure><h4>Other useful ndarray methods</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*DMEWS76apkVHJIeocde2vA.png" /></figure><h4>Summing across different axes</h4><p>We can sum across different axes of a numpy array by specifying the axis parameter of the sum function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*8dJR7_5Z8fPZnx-u54hQLA.png" /></figure><h4>Transposing Matrices</h4><p>The T attribute is equivalent to calling transpose() when the rank is ≥2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*M60KTXti4JnGoxHGKWDJbQ.png" /></figure><h4>Solving a system of linear scalar equations</h4><p>The solve function solves a system of linear scalar equations, such as:</p><p>2x + 6y = 6</p><p>5x + 3y = -9</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*r7kaySXDCcnhQYvnJ0F94g.png" /></figure><p>I hope it helps!</p><p>Happy Learning!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb9395ed2949" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[String Data Types in Python Programming Language]]></title>
            <link>https://medium.com/@chandasingh20/string-data-types-in-python-programming-language-7e64dd27d98c?source=rss-728ea4770bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e64dd27d98c</guid>
            <category><![CDATA[data-folks]]></category>
            <dc:creator><![CDATA[Chandasingh]]></dc:creator>
            <pubDate>Wed, 23 Sep 2020 09:55:08 GMT</pubDate>
            <atom:updated>2020-09-23T09:55:08.521Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Topics Covered herein:</strong></h3><ul><li>String type</li><li>Read/Convert</li><li>Indexing strings []</li><li>Slicing strings [2:4]</li><li>Looping through strings with for and while</li><li>Concatenating strings with +</li><li>String operations</li><li>String library</li><li>String Comparisons</li><li>Searching in strings</li><li>Replacing text</li><li>Stripping white space</li></ul><h3>String Data Type</h3><ul><li>A string is a sequence of characters</li><li>A string literal uses quotes &#39;Hello&#39; or &quot;Hello&quot;</li><li>For strings, + means “concatenate”</li><li>When a string contains numbers, it is still a string</li><li>We can convert numbers in a string into a number using int()</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nAdm76GCRPf0z8S5ZxHumw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FUdjS4GxRCYhry95x99Bw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5t5kIqq1LrhAQpvEOoKDQ.png" /></figure><h3>Reading and Converting</h3><ul><li>We prefer to read data in using strings and then parse and convert the data as we need</li><li>This gives us more control over error situations and/or bad user input</li><li>Raw input numbers must be converted from strings</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZj3meWjsm2N7y1nuoNLoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*quNa0r0fkNu5ao9v3_f9UQ.png" /></figure><h3>Indexing and Slicing Strings</h3><ul><li>We can get at any single character in a string using an index specified in square brackets</li><li>The index value must be an integer and starts at zero</li><li>The index value can be and expression that is computed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBiXHtyNWrB8s2Cje-BHHg.png" /></figure><p>A Character Too Far</p><ul><li>You will get a python error if you attempt to index beyond the end of a string.</li><li>So be careful when constructing index values and slices</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3ta93Ehsjtjn8QI5qq7bw.png" /></figure><p>Strings Have Length</p><ul><li>There is a built-in function “len” that gives us the length of a string</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fPZ1bRiVmjhGSoLPeIr9hA.png" /></figure><p>Len Function</p><ul><li>A function is some stored code that we use. A function takes some input and produces an output.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1AxJAHPQJnf-oKjvZlrXcg.png" /></figure><h3>Looping Through Strings</h3><ul><li>Using a <strong>while </strong>statement and an iteration variable, and the <strong>len </strong>function, we can construct a loop to look at each of the letters in a string individually</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lLth4tQVnvaXhbtyK0TFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jw6nxbMABQ75RRHB6oUZSw.png" /></figure><ul><li>A definite loop using a <strong>for </strong>statement is much more elegant</li><li>The iteration variable is completely taken care of by the <strong>for </strong>loop</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mjI_W15oEfcN0yyNQBQScw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJviPFYglY4sQD-a9dhr2Q.png" /></figure><p>Looping and Counting</p><ul><li>This is a simple loop that loops through each letter in a string and counts the number of times the loop encounters the ‘t’ character</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2gBfIQVXBFhHjXjMQqbKSw.png" /></figure><p>Looking deeper into “in”</p><ul><li>The iteration variable iterates through the sequence (ordered set)</li><li>The block (body) of code is executed once for each value in the sequence</li><li>The iteration variable moves through all of the values in the sequence</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CBdG-K0cNjjb4gyBuGiTag.png" /></figure><p>The iteration variable “iterates” through the string and the block (body) of code is executed once for each value in the sequence</p><h3>Slicing Strings</h3><ul><li>We can also look at any continuous section of a string using a colon operator</li><li>The second number is one beyond the end of the slice — “up to but not including”</li><li>If the second number is beyond the end of the string, it stops at the end</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKgg2sXQXMr-5kCexd6KDg.png" /></figure><ul><li>If we leave off the first number or the last number of the slice, it is assumed to be the beginning or end of the string respectively</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLMvwy0uS5hCG10GDWQrWw.png" /></figure><h3>Concatenating String with ‘+’</h3><ul><li>When the “+” operator is applied to strings, it means “concatenation”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FhJhI_l6UxzP2_jPuAhgg.png" /></figure><p>Using <strong>in </strong>as a logical Operator</p><ul><li>The “in” keyword can also be used to check or to see if one string is in another string</li><li>The “in” expression is a logical expression that returns True or False and can be used in an if statement</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tW_vds0g7QuCoVdVvDOOIA.png" /></figure><h3>String Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nnm5LT-fjdNIcFvfV7HyCA.png" /></figure><h3>String Library</h3><ul><li>Python has a number of string functions which are in the string library</li><li>These functions are already built into every string — we invoke them by appending the function to the string variable</li><li>These functions do not modify the original string, instead they return a new string that has been altered</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_LvvOEeooQXFbwKVg4xMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Of_1ebyUhH4NFo48iaXo0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*we9BCxn2PD68qgv3l_JgaA.png" /></figure><p>Try out:</p><p>str.center(width[,fillchar])<br>str.endswith(suffix[,start[,end]])<br>str.find(sub[,start[,end]])<br>str.lstrip([chars])</p><p>and</p><p>str.replace(old,new[, count])<br>str.lower()<br>str.rstrip([chars])<br>str.strip([chars])<br>str.upper()</p><h3>Searching a String</h3><ul><li>We use the find() function to search for a substring within another string</li><li>find() finds the first occurrence of the substring</li><li>If the substring is not found, find() returns -1</li><li>Remember that string position starts at zero</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNJGj8OR4UIePyPEhN6GjQ.png" /></figure><p>Making everything UPPER CASE</p><ul><li>You can make a copy of a string in lower case or upper case</li><li>Often when we are searching for a string using find() — we first convert the string to lower case so we can search a string regardless of case</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eysbsIvY-XrMG343aCp2Ag.png" /></figure><h3>Search and Replace</h3><ul><li>The replace() function is like a “search and replace” operation in a word processor</li><li>It replaces all occurrences of the search string with the replacement string</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-JkNcS8gQratYjPXvrntIQ.png" /></figure><h3>Stripping White space</h3><ul><li>Sometimes we want to take a string and remove white space at the beginning and/or end</li><li>lstrip() and rstrip() remove white space at the left or right</li><li>strip() removes both beginning and ending white space</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_bmH8PHc7UGNcwwGtGRmlQ.png" /></figure><p>Prefixes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ahrp_THTEBM_Zyy0_rIEsA.png" /></figure><p>Parsing and Extracting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLi0U4CktTlx8S1X8Hx2Bw.png" /></figure><p>I hope it helps!</p><p>If you liked reading this blog, Don’t forget to clap!</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e64dd27d98c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How AI and Technical Writers can boost end-user experience]]></title>
            <link>https://medium.com/@chandasingh20/how-ai-and-technical-writers-can-boost-end-user-experience-e46033ae535d?source=rss-728ea4770bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e46033ae535d</guid>
            <dc:creator><![CDATA[Chandasingh]]></dc:creator>
            <pubDate>Mon, 21 Sep 2020 12:07:24 GMT</pubDate>
            <atom:updated>2020-09-21T12:07:24.026Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How AI and Technical Writers can boost end-user experience</strong></p><p>Artificial Intelligence (AI) is a technology with lots of potential. And a lot of things are happening in the market around it too. We have noticed that recently vendors call anything ‘AI’ just to get their intended audience interested. And that’s the reason I would like to begin this post with a definition of AI, as stated by Gartner: ‘AI applies advanced analysis and logic-based techniques, including machine learning, to interpret events, automate decisions, and take actions’. Having said that, let me try to uncover the true potential of AI and Technical Writers merged into one process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*IswFyyaf8KMFtMMFAIRAtA.png" /></figure><p><strong>What AI Does Well</strong></p><p>We’ve determined several areas where AI can be successfully implemented. And, a lot of the use cases are tied to help authoring. Technical writers create texts of different nature which is just technical; they are far from being limited to user manuals in a general sense.</p><p>Technical writers create texts that are fueling human interactions with machines.</p><p>So, AI is just another technology that needs well-written laser-targeted technical texts to function. By that I don’t even mean the documentation supporting the AI technology itself, we are more so talking about the actual manifestation of AI in our lives. Now, let’s take a look at what is currently possible to achieve with the help of AI:</p><ul><li><strong>AI Chatbots</strong>: Chatbots represent a classic human-to-machine dialogue. They are responsible for a large set of all human-to-machine interactions, which, are expected to hit 85% of customer interactions by the end of 2020. Chatbots are not just meant to ‘chat’, they fulfill many requirements like to get a customer interested, to guide a customer, to help them. When good communication is combined with clear and concise technical instructions in such dialogues, customers are going to be happy for sure.</li></ul><p>Let’s have a look at how AI makes chatbots even better.</p><p>AI is involved in several processes here; the first one is <strong>data collection</strong>. While a customer can skip a survey, AI can collect all the information it needs during customer’s first interaction with a chatbot. All the questions will be seamlessly embedded into the dialogue.</p><p>Chatbots with AI can also use <strong>Databases</strong> like purchase history to get right information about the customer. And by ‘right’ I mean something that could prove useful during the human-chatbot interaction. And that can give an idea of customer interests/preferences.</p><p>Chatbots can be taught to <strong>recognize a language</strong> immediately and that means customers from around the globe can simply use their own language to start a conversation.</p><ul><li><strong>AI-Augmented Interaction</strong>: Chatbots are really popular now, but they are not something universal. We humans can get just as many benefits from using the AI-driven data analysis.</li></ul><p>Using AI analytics, Technical Communicators can create a better strategy for technical documentation.</p><p>For example, AI can help analyze support databases to give the documentation team an idea of which features require more attention in help authoring topics.</p><ul><li><strong>AI-assisted spelling and grammar: </strong>Companies are experimenting with AI techniques including machine learning and natural language processing so the software can essentially understand human language and come up with writing enhancements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*QvSIVDQlHJbD8e1tJaF-Og.png" /></figure><p><strong>Conclusion</strong></p><p>AI can be applied in hundreds of ways, with no doubt. Understanding what will bring you more value is the key. Try leveraging your goals as a technical writer with what can be achieved using AI. It can do a whole lot of the legwork, but the question is — will you be able to apply it correctly?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e46033ae535d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>