<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7178430688497932595</id><updated>2025-01-12T15:30:05.578+05:30</updated><category term="asp.net"/><title type='text'>MV&#39;s Code Guide</title><subtitle type='html'>This Blog aims to provide notes on Computer Science Subjects</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>130</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-9207883257666338284</id><published>2024-05-17T15:06:00.002+05:30</published><updated>2024-05-17T15:06:15.155+05:30</updated><title type='text'>Name Numerology </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;



&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;356&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;https://trinket.io/embed/python/488bf72b44&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Explanation:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Letter Value Mapping:&lt;/strong&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; The same dictionary &lt;code&gt;letter_values&lt;/code&gt; is used to map each letter to its corresponding value.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Convert to Lowercase:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;The input word is converted to lowercase.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Initialize Total:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;A variable &lt;code&gt;total&lt;/code&gt;&lt;/span&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;is initialized to store the sum of the values.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Iterate Over Characters:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;The program iterates over each character in the input word.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Check for Valid Characters:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;It checks if the character exists in the &lt;code&gt;letter_values&lt;/code&gt;&lt;/span&gt; dictionary.&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Calculate Value:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;For valid characters, it adds the corresponding value from the dictionary to the &lt;code&gt;total&lt;/code&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Sum Digits Function:&lt;/strong&gt; &lt;span style=&quot;font-weight: normal;&quot;&gt;A nested function &lt;code&gt;sum_digits&lt;/code&gt; is defined to sum the digits of a number repeatedly until a single-digit number is obtained.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Calculate Final Value:&lt;/strong&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; The &lt;code&gt;sum_digits&lt;/code&gt; function is called with the total sum to get the final single-digit value.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;strong&gt;Return Final Value:&lt;/strong&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; The function returns the final single-digit value.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large; font-weight: normal;&quot;&gt;This code will prompt the user to enter a word, calculate the sum of its letter values, and then reduce the sum to a single-digit number by repeatedly summing its digits&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/9207883257666338284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2024/05/name-numerology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/9207883257666338284'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/9207883257666338284'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2024/05/name-numerology.html' title='Name Numerology '/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-3689635423323507858</id><published>2023-11-20T12:40:00.006+05:30</published><updated>2023-11-20T12:40:41.803+05:30</updated><title type='text'>Password Generator</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(32, 32, 32); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;1
2
3
4
5&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #6ab825; font-size: medium; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline;&quot;&gt;random&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;passlen&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter the length of password&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;s=&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&amp;amp;*()?&quot;&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;p&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;.join(random.sample(s,passlen&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(p)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Output 1:&lt;/p&gt;&lt;p&gt;Enter the length of password&lt;br /&gt;8&lt;br /&gt;I^GOo9)2&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Output 2:&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;Enter the length of password&lt;br /&gt;12&lt;br /&gt;pLfdoThK2eny&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/3689635423323507858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/password-generator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/3689635423323507858'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/3689635423323507858'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/password-generator.html' title='Password Generator'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-8721884015165956754</id><published>2023-11-20T12:27:00.003+05:30</published><updated>2023-11-20T12:27:44.859+05:30</updated><title type='text'>Value Convertor</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(32, 32, 32); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #6ab825; font-size: medium; font-weight: bold;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;convert_temperature&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;\n Which conversion do you want to choose:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. Celsius to Faranheit&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. Faranheit to Celsius&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;temp&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter temperature in celsius: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{temp} degree celsius is equal to {(temp*9/5)+32} degree faranheit.\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;temp&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter temperature in faranheit: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{temp} degree faranheit is equal to {(temp-32)*5/9} degree celsius.\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Invalid input...please try again\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;convert_currency&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;

    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;\n Which conversion do you want to choose:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. Dollar to pound&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. Pound to Dollar&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;3. Dollar to Rupees&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;4. Rupees to Dollar&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;

    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter currency in dollars: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{value} dollars in pounds will be {value*0.73}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter currency in pounds: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{value} pounds in dollars will be {value/0.73}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter currency in dollar: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{value} dollars in rupees will be {value*83.32}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter currency in Rupees: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{value} rupees in dollars will be {value/83.32}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;convert_lengths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;

    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;\n Which conversion do you want to choose:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. Centimeters to foot and inches&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. Foot and inches to centimeter&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter length in cm: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;inches&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value/&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;2.54&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;feet&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;inches/&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;12&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{value} centimeters in equal to {feet} feet and {inches} inch\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;feet&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter length in feet: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;inches&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter length in inches: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;length&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(feet*&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;12&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;inches)*&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;2.54&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;{feet} feet and {inches} inches in centimeters will be {length}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;===== Welcome to Value Converter =====&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Which option would you like to choose:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. Convert temperature&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. Convert currency&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;3. Convert lengths&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;4. Exit&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;convert_temperature()&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;convert_currency()&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;convert_lengths()&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Exiting...&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;exit(&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;===== Welcome to Value Converter =====&lt;br /&gt;Which option would you like to choose:-&lt;br /&gt;1. Convert temperature&lt;br /&gt;2. Convert currency&lt;br /&gt;3. Convert lengths&lt;br /&gt;4. Exit&lt;br /&gt;Enter your choice: &lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Which conversion do you want to choose:-&lt;br /&gt;1. Dollar to pound&lt;br /&gt;2. Pound to Dollar&lt;br /&gt;3. Dollar to Rupees&lt;br /&gt;4. Rupees to Dollar&lt;br /&gt;Enter your choice: &lt;br /&gt;3&lt;br /&gt;Enter currency in dollar: &lt;br /&gt;20&lt;br /&gt;20.0 dollars in rupees will be 1666.3999999999999&lt;br /&gt;&lt;br /&gt;Which option would you like to choose:-&lt;br /&gt;1. Convert temperature&lt;br /&gt;2. Convert currency&lt;br /&gt;3. Convert lengths&lt;br /&gt;4. Exit&lt;br /&gt;Enter your choice: &lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Which conversion do you want to choose:-&lt;br /&gt;1. Dollar to pound&lt;br /&gt;2. Pound to Dollar&lt;br /&gt;3. Dollar to Rupees&lt;br /&gt;4. Rupees to Dollar&lt;br /&gt;Enter your choice: &lt;br /&gt;4&lt;br /&gt;Enter currency in Rupees: &lt;br /&gt;80&lt;br /&gt;80.0 rupees in dollars will be 0.9601536245799329&lt;br /&gt;&lt;br /&gt;Which option would you like to choose:-&lt;br /&gt;1. Convert temperature&lt;br /&gt;2. Convert currency&lt;br /&gt;3. Convert lengths&lt;br /&gt;4. Exit&lt;br /&gt;Enter your choice: &lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Which conversion do you want to choose:-&lt;br /&gt;1. Centimeters to foot and inches&lt;br /&gt;2. Foot and inches to centimeter&lt;br /&gt;Enter your choice: &lt;br /&gt;1&lt;br /&gt;Enter length in cm: &lt;br /&gt;156&lt;br /&gt;156.0 centimeters in equal to 5.118110236220472 feet and 61.41732283464567 inch&lt;br /&gt;&lt;br /&gt;Which option would you like to choose:-&lt;br /&gt;1. Convert temperature&lt;br /&gt;2. Convert currency&lt;br /&gt;3. Convert lengths&lt;br /&gt;4. Exit&lt;br /&gt;Enter your choice: &lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Which conversion do you want to choose:-&lt;br /&gt;1. Celsius to Faranheit&lt;br /&gt;2. Faranheit to Celsius&lt;br /&gt;Enter your choice: &lt;br /&gt;1&lt;br /&gt;Enter temperature in celsius: &lt;br /&gt;32&lt;br /&gt;32.0 degree celsius is equal to 89.6 degree faranheit.&lt;br /&gt;&lt;br /&gt;Which option would you like to choose:-&lt;br /&gt;1. Convert temperature&lt;br /&gt;2. Convert currency&lt;br /&gt;3. Convert lengths&lt;br /&gt;4. Exit&lt;br /&gt;Enter your choice: &lt;br /&gt;4&lt;br /&gt;Exiting...&lt;br /&gt;&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/8721884015165956754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/value-convertor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8721884015165956754'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8721884015165956754'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/value-convertor.html' title='Value Convertor'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-1289920424256974126</id><published>2023-11-20T12:26:00.000+05:30</published><updated>2023-11-20T12:26:17.066+05:30</updated><title type='text'>User Management System</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;div style=&quot;background: rgb(32, 32, 32); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #d0d0d0; font-size: medium;&quot;&gt;database&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;[]}&lt;/span&gt;

&lt;span style=&quot;color: #d0d0d0;&quot;&gt;SRNO&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;srno&#39;&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;NAME&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;name&#39;&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;AGE&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;age&#39;&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;GENDER&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;gender&#39;&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;OCCUPATION&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;occupation&#39;&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;get_serial_no&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;len&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;])&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;add_entry&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(entry):&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;srno&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;get_serial_no(),&lt;/span&gt;
        &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;],&lt;/span&gt;
        &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;age&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;age&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;],&lt;/span&gt;
        &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;gender&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;gender&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;],&lt;/span&gt;
        &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;occupation&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;occupation&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;].append(entry)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;check_entry_presence&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value):&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;num,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;enumerate&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]):&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]:&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;search_entry&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value):&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;num,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;enumerate&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]):&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]:&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;update_entry&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;updated_entry):&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;num,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;enumerate&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]):&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;][num]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;updated_entry&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;delete_entry&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value):&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;num,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;enumerate&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]):&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry[value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value[&lt;/span&gt;&lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;entries&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;].remove(entry)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;display_entry&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(entry):&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;SRNO: {entry[&#39;srno&#39;]}&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Name: {entry[&#39;name&#39;]}&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Age: {entry[&#39;age&#39;]}&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Gender: {entry[&#39;gender&#39;]}&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(f&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Occupation: {entry[&#39;occupation&#39;]}\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;display_all_entries&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;database[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;entries&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]:&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;display_entry(entry)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;select_entry_and_value&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;&#39;&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;&#39;&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Choose an entry based on which to search entries in database: &#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. srno&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. name&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;3. age&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;4. gender&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;5. occupation&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Invalid input...please try again&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;SRNO&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter serial number to search: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value_type,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value)&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;NAME&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter name to search: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value_type,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value)&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;AGE&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter age to search: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value_type,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value)&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;GENDER&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter gender to search: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value_type,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value)&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value_type&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;OCCUPATION&lt;/span&gt;
                &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter occupation to search: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;(value_type,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #447fcf;&quot;&gt;get_entry_details&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;():&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;{}&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output[NAME]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter name: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output[AGE]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter age: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output[GENDER]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter gender: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output[OCCUPATION]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter occupation: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;output&lt;/span&gt;

&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;===== Welcome To User Management System =====&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;\n What would you like to do:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;1. Add an entry&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;2. Update an entry&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;3. Delete an entry&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;4. Search an entry&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;5. Display all entries&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;6. Exit&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;))&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;7&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Invalid input...please try again&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Enter details for the new entry:-&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;get_entry_details()&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;add_entry(entry)&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Entry successfully created...&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;select_entry_and_value()&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Enter the details of the updated entry:-&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;get_entry_details()&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;update_entry(value,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry)&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Entry successfully updated...&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;select_entry_and_value()&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;delete_entry(value)&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Entry successfully deleted...&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;select_entry_and_value()&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;entry&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;search_entry(value)&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;display_entry(entry)&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0;&quot;&gt;display_all_entries()&lt;/span&gt;
        &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;choice&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Exiting&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;break&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/1289920424256974126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/user-management-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/1289920424256974126'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/1289920424256974126'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/user-management-system.html' title='User Management System'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-683729140074343127</id><published>2023-11-20T11:58:00.000+05:30</published><updated>2023-11-20T11:58:00.490+05:30</updated><title type='text'>Rock Paper Scissors Game Using Python</title><content type='html'>&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(32, 32, 32); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #6ab825; font-size: medium; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline;&quot;&gt;random&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;player1=&lt;/span&gt;&lt;span style=&quot;color: #24909d;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Select Rock, Paper, or Scissors :&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;).lower()&lt;/span&gt;
&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 1 selected:&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,player1)&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;player2=random.choice([&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Rock&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Paper&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Scissors&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]).lower()&lt;/span&gt;
&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 2 selected:&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,player2)&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player1==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;rock&#39;&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player2==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;paper&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
	&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 2 Won !&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player1==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;paper&#39;&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player2==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;scissors&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
	&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 2 Won!&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player1==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;scissors&#39;&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;and&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player2==&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;rock&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
	&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 2 Won !&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;elif&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;player1==player2:&lt;/span&gt;
	&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;It&#39;s A Tie !&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;:&lt;/span&gt;
	&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&quot;Player 1 Won !&quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Output 1:&lt;/p&gt;&lt;p&gt;Select Rock, Paper, or Scissors :&lt;br /&gt;rock&lt;br /&gt;Player 1 selected: rock&lt;br /&gt;Player 2 selected: paper&lt;br /&gt;Player 2 Won !&lt;/p&gt;&lt;p&gt;Output 2:&lt;/p&gt;&lt;p&gt;Select Rock, Paper, or Scissors :&lt;br /&gt;Paper&lt;br /&gt;Player 1 selected: paper&lt;br /&gt;Player 2 selected: scissors&lt;br /&gt;Player 2 Won!&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Output 3:&lt;/p&gt;&lt;p&gt;Select Rock, Paper, or Scissors :&lt;br /&gt;Scissors&lt;br /&gt;Player 1 selected: scissors&lt;br /&gt;Player 2 selected: rock&lt;br /&gt;Player 2 Won !&lt;/p&gt;&lt;p&gt;Output 4:&lt;/p&gt;&lt;p&gt;Select Rock, Paper, or Scissors :&lt;br /&gt;paper&lt;br /&gt;Player 1 selected: paper&lt;br /&gt;Player 2 selected: paper&lt;br /&gt;It&#39;s A Tie !&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/683729140074343127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/rock-paper-scissors-game-using-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/683729140074343127'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/683729140074343127'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/rock-paper-scissors-game-using-python.html' title='Rock Paper Scissors Game Using Python'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-8587877247030196746</id><published>2023-11-20T10:46:00.002+05:30</published><updated>2023-11-20T10:46:24.950+05:30</updated><title type='text'>Story Generator in Python</title><content type='html'>&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Using Random Module You Can Generate a random story&amp;nbsp;&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(32, 32, 32); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;1
2
3
4
5
6
7
8&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #6ab825; font-size: medium; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline;&quot;&gt;random&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;when=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;A few years ago&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Yesterday&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Last night&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;A long time ago&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;On 20th Jan&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;who=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;a rabbit&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;an elephant&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;a mouse&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;a turtle&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;a cat&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;namee=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Ali&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Mariam&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Daniel&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Houck&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Starwalker&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;residence=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Barcelona&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;India&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;Germany&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;London&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;England&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;went=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;cinema&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;university&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;seminar&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;school&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;laundary&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0;&quot;&gt;happened=[&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;made a lot of friends&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;eats a burger&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;found a secret key&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;solved a mystery&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;wrote a book&#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #24909d;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;(random.choice(when)+&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;, &#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;+random.choice(namee)+&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39; that lived in &#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0;&quot;&gt;random.choice(residence)+&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39;, went to the &#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;+random.choice(went)+&lt;/span&gt;&lt;span style=&quot;color: #ed9d13;&quot;&gt;&#39; and &#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0;&quot;&gt;+random.choice(happened))&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Output 1:&lt;/p&gt;&lt;p&gt;A long time ago, Mariam that lived in Germany, went to the cinema and eats a burger&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Output 2:&amp;nbsp;&lt;/p&gt;&lt;p&gt;Last night, Ali that lived in Germany, went to the seminar and solved a mystery&lt;br /&gt;&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/8587877247030196746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/story-generator-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8587877247030196746'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8587877247030196746'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/story-generator-in-python.html' title='Story Generator in Python'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-5035093611115838970</id><published>2023-11-11T15:23:00.002+05:30</published><updated>2023-11-23T11:47:40.877+05:30</updated><title type='text'>Pandas</title><content type='html'>&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:OfficeDocumentSettings&gt;
  &lt;o:AllowPNG/&gt;
 &lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves&gt;false&lt;/w:TrackMoves&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-IN&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:EnableOpenTypeKerning/&gt;
   &lt;w:DontFlipMirrorIndents/&gt;
   &lt;w:OverrideTableStyleHps/&gt;
  &lt;/w:Compatibility&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;false&quot;
  DefSemiHidden=&quot;false&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;376&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footnote text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;header&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footer&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;index heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;table of figures&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;envelope address&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;envelope return&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;footnote reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;line number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;page number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;endnote reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;endnote text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;table of authorities&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;macro&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;toa heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Bullet 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Number 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Closing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Signature&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;List Continue 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Message Header&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Salutation&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Date&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text First Indent&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text First Indent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Note Heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Body Text Indent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Block Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Hyperlink&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;FollowedHyperlink&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Document Map&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Plain Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;E-mail Signature&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Top of Form&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Bottom of Form&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal (Web)&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Acronym&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Address&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Cite&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Code&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Definition&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Keyboard&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Preformatted&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Sample&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Typewriter&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;HTML Variable&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Normal Table&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;annotation subject&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;No List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Outline List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Simple 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Classic 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Colorful 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Columns 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Grid 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table List 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table 3D effects 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Contemporary&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Elegant&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Professional&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Subtle 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Subtle 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Web 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Balloon Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Table Theme&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; QFormat=&quot;true&quot;
   Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; QFormat=&quot;true&quot;
   Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; QFormat=&quot;true&quot;
   Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; QFormat=&quot;true&quot;
   Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; SemiHidden=&quot;true&quot;
   UnhideWhenUsed=&quot;true&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;41&quot; Name=&quot;Plain Table 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;42&quot; Name=&quot;Plain Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;43&quot; Name=&quot;Plain Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;44&quot; Name=&quot;Plain Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;45&quot; Name=&quot;Plain Table 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;40&quot; Name=&quot;Grid Table Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot; Name=&quot;Grid Table 1 Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot; Name=&quot;Grid Table 6 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot; Name=&quot;Grid Table 7 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;Grid Table 1 Light Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;Grid Table 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;Grid Table 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;Grid Table 4 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;Grid Table 5 Dark Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;Grid Table 6 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;Grid Table 7 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot; Name=&quot;List Table 1 Light&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot; Name=&quot;List Table 6 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot; Name=&quot;List Table 7 Colorful&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;46&quot;
   Name=&quot;List Table 1 Light Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;47&quot; Name=&quot;List Table 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;48&quot; Name=&quot;List Table 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;49&quot; Name=&quot;List Table 4 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;50&quot; Name=&quot;List Table 5 Dark Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;51&quot;
   Name=&quot;List Table 6 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;52&quot;
   Name=&quot;List Table 7 Colorful Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Mention&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Smart Hyperlink&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Hashtag&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Unresolved Mention&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; SemiHidden=&quot;true&quot; UnhideWhenUsed=&quot;true&quot;
   Name=&quot;Smart Link&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:&quot;Table Normal&quot;;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-parent:&quot;&quot;;
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin-top:0cm;
	mso-para-margin-right:0cm;
	mso-para-margin-bottom:8.0pt;
	mso-para-margin-left:0cm;
	line-height:107%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:&quot;Calibri&quot;,sans-serif;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:&quot;Times New Roman&quot;;
	mso-bidi-theme-font:minor-bidi;
	mso-font-kerning:1.0pt;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;This tutorial will explore the
most potent Python library&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;pandas&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;,&amp;nbsp; and we will discuss the
most important functions of this library that are important for data analysis.
Beginners can also follow this tutorial due to its simplicity and efficiency.
If you don’t have python installed in your system, you can use Google
Colaboratory.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; mso-outline-level: 1; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 24.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 18.0pt; mso-ligatures: none;&quot;&gt;Importing Data&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;You can download the
dataset from that&amp;nbsp;&lt;a href=&quot;https://draft.blogger.com/&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #211f1f; font-size: 12.0pt; mso-border-alt: none windowtext 0cm; padding: 0cm;&quot;&gt;link&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;a href=&quot;https://draft.blogger.com/&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #211f1f; font-family: &amp;quot;Times New Roman&amp;quot;,serif; mso-border-alt: none windowtext 0cm; padding: 0cm;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;import pandas as pd&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df =
pd.read_csv(&quot;kaggle_sales_data.csv&quot;,
encoding=&quot;Latin-1&quot;)&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;# Load the
data&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.head()&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;# Show first five rows&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;139&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg&quot; width=&quot;602&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; mso-outline-level: 1; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 24.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 18.0pt; mso-ligatures: none;&quot;&gt;Data Exploration&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;In this section, we will
discuss various functions that help you to get more about your data. Like
viewing it or getting the mean, average, min/max, or getting information about
the dataframe.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;1. Data Viewing&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.head()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It displays the first five rows of the sample data&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;139&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image003.jpg&quot; width=&quot;602&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l13 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.tail()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It displays the last five rows of the sample data&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;114&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png&quot; width=&quot;602&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l4 level1 lfo2; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.sample(n)&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It displays the random n number of rows in the
sample data&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.sample(6)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;132&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image007.png&quot; width=&quot;602&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l10 level1 lfo3; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.shape&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It displays the sample data&#39;s rows and columns
(dimensions).&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;(2823, 25)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;It signifies that our
dataset has 2823 rows, each containing 25 columns.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;2. Statistics&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;This section contains the
functions that help you perform statistics like average, min/max, and quartiles
on your data.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l11 level1 lfo4; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.describe()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: Get the basic statistics of each column of the
sample data&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;167&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image009.png&quot; width=&quot;602&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.info()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: Get the information about the various data types
used and the non-null count of each column.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;span style=&quot;mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;257&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image011.jpg&quot; width=&quot;306&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l3 level1 lfo5; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.corr()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: This can give you the correlation matrix between
all the integer columns in the data frame.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;186&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image013.jpg&quot; width=&quot;601&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l12 level1 lfo6; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.memory_usage()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It will tell you how much memory is being
consumed by each column.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;332&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image015.jpg&quot; width=&quot;284&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoListParagraph&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l3 level1 lfo5; mso-outline-level: 2; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Data
Selection&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-outline-level: 2;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;You can also select the data of any specific
row, column, or even multiple columns.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l1 level1 lfo7; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.iloc[row_num]&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;:&amp;nbsp; It will select a particular row based on
its index&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.iloc[0]&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[col_name]&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It will select the particular column&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[&quot;SALES&quot;]&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;164&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image017.jpg&quot; width=&quot;277&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l8 level1 lfo8; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[[‘col1’,
‘col2’]]&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It will select multiple
columns given&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[[&quot;SALES&quot;,
&quot;PRICEEACH&quot;]]&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;236&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image019.jpg&quot; width=&quot;195&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; mso-outline-level: 1; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 24.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 18.0pt; mso-ligatures: none;&quot;&gt;4. Data Cleaning&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;These functions are used to handle the missing
data. Some rows in the data contain some null and garbage values, which can
hamper the performance of our trained model. So, it is always better to correct
or remove these missing values.&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo9; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.isnull()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: This will identify the missing values in your
dataframe.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo9; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.dropna()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: This will remove the rows containing missing
values in any column.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo9; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.fillna(val)&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: This will fill the missing values with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;given
in the argument.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo9; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[‘col’].astype(new_data_type)&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It can convert the data type of the selected
columns to a different data type.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[&quot;SALES&quot;].astype(int)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We are converting the data type
of the SALES column from float to int.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;130&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image021.jpg&quot; width=&quot;211&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 24.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 18.0pt; mso-ligatures: none;&quot;&gt;5. Data Analysis&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Here, we will use some
helpful functions in data analysis, like grouping, sorting, and filtering.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l7 level1 lfo10; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Aggregation
Functions:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;You can group a column by its
name and then apply some aggregation functions like sum, min/max, mean, etc.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.groupby(&quot;col_name_1&quot;).agg({&quot;col_name_2&quot;:
&quot;sum&quot;})&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.groupby(&quot;CITY&quot;).agg({&quot;SALES&quot;:
&quot;sum&quot;})&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;It will give you the total sales
of each city.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;262&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image023.jpg&quot; width=&quot;122&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;If you want to apply multiple
aggregations at a single time, you can write them like that.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;aggregation =
df.agg({&quot;SALES&quot;: &quot;sum&quot;, &quot;QUANTITYORDERED&quot;:
&quot;mean&quot;})&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;SALES&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 1.003263e+07&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;QUANTITYORDERED&amp;nbsp; &amp;nbsp;
3.509281e+01&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;dtype: float64&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l6 level1 lfo11; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Filtering
Data:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We can filter the data in rows
based on a specific value or a condition.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[df[&quot;SALES&quot;] &amp;gt;
5000]&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Displays the rows where the
value of sales is greater than 5000&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;You can also filter the
dataframe using the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;query()&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;function. It will also generate a similar
output as above.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.query(&quot;SALES&quot; &amp;gt;
5000)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l5 level1 lfo12; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Sorting
Data:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;You can sort the data based on a
specific column, either in the ascending order or in the descending order.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df.sort_values(&quot;SALES&quot;,
ascending=False)&amp;nbsp; &lt;i&gt;# Sorts the data in descending order&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l2 level1 lfo13; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Pivot
Tables:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We can create pivot tables that
summarize the data using specific columns. This is very useful in analyzing the
data when you only want to consider the effect of particular columns.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;pd.pivot_table(df,
values=&quot;SALES&quot;, index=&quot;CITY&quot;, columns=&quot;YEAR_ID&quot;,
aggfunc=&quot;sum&quot;)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Let me break this for you.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l9 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;values&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It contains the column for which you want to
populate the table&#39;s cells.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l9 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: The column used in it will become the row index
of the pivot table, and each unique category of this column will become a row
in the pivot table.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l9 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;columns&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: It contains the headers of the pivot table, and
each unique element will become the column in the pivot table.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm; margin-left: 49.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l9 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Open Sans&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;aggfunc&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;: This is the same aggregator function we discussed
earlier.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;245&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image025.jpg&quot; width=&quot;197&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;This output shows a chart which
depicts the total sales in a particular city for a specific year.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;6. Combining Data Frames&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;We can combine and merge
several data frames either horizontally or vertically. It will concatenate two
data frames and return a single merged data frame.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;combined_df = pd.concat([df1,
df2])&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;You can merge two data frames
based on a common column. It is useful when you want to combine two data frames
that share a common identifier.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;merged_df = pd.merge(df1, df2,
on=&quot;common_col&quot;)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;7. Applying Custom Functions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;You can apply custom functions
according to your needs in either a row or a column.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;def cus_fun(x):&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return x * 3&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[&quot;Sales_Tripled&quot;] =
df[&quot;SALES&quot;].apply(cus_fun, axis=0)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We have written a custom
function that will triple the sales value for each row.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;axis=0&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;means that we want to apply the custom function on a column,
and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;axis=1&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;implies that we want to apply the function on
a row.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;In the earlier method you have
to write a separate function and then to call it from the apply() method.
Lambda function helps you to use the custom function inside the apply() method
itself. Let’s see how we can do that.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[&quot;Sales_Tripled&quot;] =
df[&quot;SALES&quot;].apply(lambda x: x * 3)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 27.0pt; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Applymap:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We can also apply a custom
function to every element of the dataframe in a single line of code. But a
point to remember is that it is applicable to all the elements in the
dataframe.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df = df.applymap(lambda x:
str(x))&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;It will convert the data
type to a string of all the elements in the dataframe.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;8. Time Series Analysis&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;In mathematics, time
series analysis means analyzing the data collected over a specific time
interval, and pandas have functions to perform this type of analysis.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 27.0pt; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Conversion to DateTime Object Model:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;We can convert the date column
into a datetime format for easier data manipulation.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;df[&quot;ORDERDATE&quot;] =
pd.to_datetime(df[&quot;ORDERDATE&quot;])&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;138&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image027.png&quot; width=&quot;138&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 27.0pt; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Calculate Rolling Average:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Using this method, we can create
a rolling window to view data. We can specify a rolling window of any size. If
the window size is 5, then it means a 5-day data window at that time. It can
help you remove fluctuations in your data and help identify patterns over time.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;rolling_avg =
df[&quot;SALES&quot;].rolling(window=5).mean()&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Output:&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;148&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image028.png&quot; width=&quot;148&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;9. Cross Tabulation&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;We can perform
cross-tabulation between two columns of a table. It is generally a frequency
table that shows the frequency of occurrences of various categories. It can
help you to understand the distribution of categories across different regions.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;For ex-,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Getting a cross-tabulation
between the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;COUNTRY&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;DEALSIZE&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;cross_tab =
pd.crosstab(df[&quot;COUNTRY&quot;], df[&quot;DEALSIZE&quot;])&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;It can show you the order size
(‘DEALSIZE’) ordered by different countries.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-no-proof: yes;&quot;&gt;&lt;img alt=&quot;10 Essential Pandas Functions Every Data Scientist Should Know&quot; border=&quot;0&quot; height=&quot;174&quot; src=&quot;file:///C:/Users/Lenovo/AppData/Local/Temp/msohtmlclip1/01/clip_image029.png&quot; width=&quot;174&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 15.0pt; margin-bottom: 0cm; mso-outline-level: 2;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 15.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;10. Handling Outliers&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Outliers in data means
that a particular point goes far beyond the average range. Let’s understand it
through an example. Suppose you have 5 points, say 3, 5, 6, 46, 8. Then we can
clearly say that the number 46 is an outlier because it is far beyond the
average of the rest of the points. These outliers can lead to wrong statistics
and should be removed from the dataset.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Here pandas come to the rescue
to find these potential outliers. We can use a method called Interquartile
Range(IQR), which is a common method for finding and handling these outliers.
You can also read about this method if you want information on it. You can read
more about them&amp;nbsp;&lt;a href=&quot;https://draft.blogger.com/&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #211f1f; font-size: 12.0pt; mso-border-alt: none windowtext 0cm; padding: 0cm;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Let’s see how we can do that
using pandas.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Q1 =
df[&quot;SALES&quot;].quantile(0.25)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Q3 =
df[&quot;SALES&quot;].quantile(0.75)&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;IQR = Q3 - Q1&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;lower_bound = Q1 - 1.5 * IQR&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;upper_bound = Q3 + 1.5 * IQR&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: whitesmoke; line-height: normal; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;outliers =
df[(df[&quot;SALES&quot;] &amp;lt; lower_bound) | (df[&quot;SALES&quot;] &amp;gt;
upper_bound)]&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;Q1 is the first quartile
representing the 25th percentile of the data and Q3 is the third quartile
representing the 75th percentile of the data.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;lower_bound&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;variable stores the lower bound that is used
for finding potential outliers. Its value is set to 1.5 times the IQR below Q1.
Similarly,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: whitesmoke; color: #111111; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;upper_bound&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;calculates the upper bound, 1.5 times the IQR
above Q3.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;After which, you filter out the
outliers that are less than the lower or greater than the upper bound.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; mso-outline-level: 1; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 24.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 18.0pt; mso-ligatures: none;&quot;&gt;Wrapping it Up&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 34.15pt; margin-bottom: 9.0pt;&quot;&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&amp;nbsp;Python pandas library
enables us to perform advanced data analysis and manipulations. These are only
a few of them. You can find some more tools in&amp;nbsp;&lt;a href=&quot;https://draft.blogger.com/&quot;&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #211f1f; font-size: 12.0pt; mso-border-alt: none windowtext 0cm; padding: 0cm;&quot;&gt;this&lt;/span&gt;&lt;/a&gt;&amp;nbsp;pandas
documentation. One important thing to remember is that the selection of
techniques can be specific which caters to your needs and the dataset you are
using.&lt;/span&gt;&lt;span style=&quot;color: black; display: none; font-family: &amp;quot;Arial&amp;quot;,sans-serif; font-size: 8.0pt; mso-color-alt: windowtext; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-hide: all; mso-ligatures: none;&quot;&gt;Top of Form&lt;/span&gt;&lt;span style=&quot;color: #111111; font-family: &amp;quot;Open Sans&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-font-kerning: 0pt; mso-ligatures: none;&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/5035093611115838970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/pandas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5035093611115838970'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5035093611115838970'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/pandas.html' title='Pandas'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-2650724711758005752</id><published>2023-11-06T21:35:00.002+05:30</published><updated>2023-11-06T21:35:23.422+05:30</updated><title type='text'>Diwali Sales Analysis</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #888888;&quot;&gt;# import python libraries&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;numpy&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;np&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;pandas&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;pd&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;matplotlib.pyplot&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;plt&lt;/span&gt; &lt;span style=&quot;color: #888888;&quot;&gt;# visualizing data&lt;/span&gt;
&lt;span style=&quot;color: #888888;&quot;&gt;# %matplotlib inline&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;seaborn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sns&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# import csv file&lt;/span&gt;
df &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; pd&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;read_csv(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;/content/drive/MyDrive/Colab Notebooks/Diwali Sales Data.csv&#39;&lt;/span&gt;, encoding&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;unicode_escape&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;google.colab&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; drive
drive&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;mount(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;/content/drive&#39;&lt;/span&gt;)

df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;shape

df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head()

df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;info()

&lt;span style=&quot;color: #888888;&quot;&gt;#drop unrelated/blank columns&lt;/span&gt;
df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;drop([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Status&#39;&lt;/span&gt;, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;unnamed1&#39;&lt;/span&gt;], axis&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;, inplace&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;True&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;#check for null values&lt;/span&gt;
pd&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;isnull(df)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()

&lt;span style=&quot;color: #888888;&quot;&gt;# drop null values&lt;/span&gt;
df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;dropna(inplace&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;True&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;# change data type&lt;/span&gt;
df[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;astype(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;int&#39;&lt;/span&gt;)

df[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;dtypes

df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;columns

&lt;span style=&quot;color: #888888;&quot;&gt;#rename column&lt;/span&gt;
df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;rename(columns&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; {&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Marital_Status&#39;&lt;/span&gt;:&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Shaadi&#39;&lt;/span&gt;})

&lt;span style=&quot;color: #888888;&quot;&gt;# describe() method returns description of the data in the DataFrame (i.e. count, mean, std, etc)&lt;/span&gt;
df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;describe()

&lt;span style=&quot;color: #888888;&quot;&gt;# use describe() for specific columns&lt;/span&gt;
df[[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Age&#39;&lt;/span&gt;, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;describe()

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;# Exploratory Data Analysis&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### Gender&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# plotting a bar chart for Gender and it&#39;s count&lt;/span&gt;

ax &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;countplot(x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;,data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; bars &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;in&lt;/span&gt; ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;containers:
    ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;bar_label(bars)

&lt;span style=&quot;color: #888888;&quot;&gt;# plotting a bar chart for gender vs total amount&lt;/span&gt;

sales_gen &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt; ,data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_gen)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the buyers are females and even the purchasing power of females are greater than men*&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### Age&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

ax &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;countplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Age Group&#39;&lt;/span&gt;, hue &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; bars &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;in&lt;/span&gt; ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;containers:
    ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;bar_label(bars)

&lt;span style=&quot;color: #888888;&quot;&gt;# Total Amount vs Age Group&lt;/span&gt;
sales_age &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Age Group&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Age Group&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt; ,data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_age)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the buyers are of age group between 26-35 yrs female*&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### State&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# total number of orders from top 10 states&lt;/span&gt;

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;State&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;10&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;15&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;State&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;# total amount/sales from top 10 states&lt;/span&gt;

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;State&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;10&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;15&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;State&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the orders &amp;amp; total sales/amount are from Uttar Pradesh, Maharashtra and Karnataka respectively*&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### Marital Status&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

ax &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;countplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Marital_Status&#39;&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;7&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; bars &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;in&lt;/span&gt; ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;containers:
    ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;bar_label(bars)

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Marital_Status&#39;&lt;/span&gt;, &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;6&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Marital_Status&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, hue&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Gender&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the buyers are married (women) and they have high purchasing power*&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### Occupation&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;20&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
ax &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;countplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Occupation&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; bars &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;in&lt;/span&gt; ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;containers:
    ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;bar_label(bars)

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Occupation&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;20&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Occupation&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the buyers are working in IT, Healthcare and Aviation sector*&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;### Product Category&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;20&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
ax &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;countplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_Category&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; bars &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;in&lt;/span&gt; ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;containers:
    ax&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;bar_label(bars)

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_Category&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;10&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;20&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_Category&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Amount&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;*From above graphs we can see that most of the sold products are from Food, Clothing and Electronics category*&quot;&quot;&quot;&lt;/span&gt;

sales_state &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby([&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_ID&#39;&lt;/span&gt;], as_index&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(by&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;, ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;10&lt;/span&gt;)

sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;set(rc&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;figure.figsize&#39;&lt;/span&gt;:(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;20&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)})
sns&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;barplot(data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; sales_state, x &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_ID&#39;&lt;/span&gt;,y&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;# top 10 most sold products (same thing as above)&lt;/span&gt;

fig1, ax1 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; plt&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;subplots(figsize&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;7&lt;/span&gt;))
df&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Product_ID&#39;&lt;/span&gt;)[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Orders&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sum()&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;nlargest(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;10&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;sort_values(ascending&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020;&quot;&gt;False&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;plot(kind&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;bar&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;## Conclusion:&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;###&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;*Married women age group 26-35 yrs from UP,  Maharastra and Karnataka working in IT, Healthcare and Aviation are more likely to buy products from Food, Clothing and Electronics category*&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;


&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Link for Google Collaboratry: &lt;a href=&quot;https://colab.research.google.com/drive/1HrOGTXumdQ739Qqmct7Jh1NuCAbfD5i7?usp=sharing&quot; target=&quot;_blank&quot;&gt;Click Here&lt;/a&gt;&lt;br /&gt;




</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/2650724711758005752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/diwali-sales-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2650724711758005752'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2650724711758005752'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/diwali-sales-analysis.html' title='Diwali Sales Analysis'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-8267642463739949020</id><published>2023-11-06T20:33:00.000+05:30</published><updated>2023-11-06T20:33:02.142+05:30</updated><title type='text'>House Price Prediction</title><content type='html'>&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #888888&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;Importing the Dependencies&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;numpy&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;np&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;pandas&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;pd&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;matplotlib.pyplot&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;plt&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;seaborn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sns&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn.datasets&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn.model_selection&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; train_test_split
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;xgboost&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; XGBRegressor
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; metrics

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Importing the Boston House Price Dataset&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

house_price_dataset &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; sklearn&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;datasets&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;load_boston()

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(house_price_dataset)

&lt;span style=&quot;color: #888888&quot;&gt;# Loading the dataset to a Pandas DataFrame&lt;/span&gt;
house_price_dataframe &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; pd&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;DataFrame(house_price_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;data, columns &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; house_price_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;feature_names)

&lt;span style=&quot;color: #888888&quot;&gt;# Print First 5 rows of our DataFrame&lt;/span&gt;
house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;head()

&lt;span style=&quot;color: #888888&quot;&gt;# add the target (price) column to the DataFrame&lt;/span&gt;
house_price_dataframe[&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;price&amp;#39;&lt;/span&gt;] &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; house_price_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;target

house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;head()

&lt;span style=&quot;color: #888888&quot;&gt;# checking the number of rows and Columns in the data frame&lt;/span&gt;
house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;shape

&lt;span style=&quot;color: #888888&quot;&gt;# check for missing values&lt;/span&gt;
house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;isnull()&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;sum()

&lt;span style=&quot;color: #888888&quot;&gt;# statistical measures of the dataset&lt;/span&gt;
house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;describe()

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Understanding the correlation between various features in the dataset&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;1. Positive Correlation&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;2. Negative Correlation&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

correlation &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;corr()

&lt;span style=&quot;color: #888888&quot;&gt;# constructing a heatmap to nderstand the correlation&lt;/span&gt;
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;figure(figsize&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;(&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;10&lt;/span&gt;,&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;10&lt;/span&gt;))
sns&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;heatmap(correlation, cbar&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;, square&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;, fmt&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;.1f&amp;#39;&lt;/span&gt;, annot&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;, annot_kws&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;{&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;size&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;8&lt;/span&gt;}, cmap&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Blues&amp;#39;&lt;/span&gt;)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Splitting the data and Target&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

X &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; house_price_dataframe&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;drop([&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;price&amp;#39;&lt;/span&gt;], axis&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;1&lt;/span&gt;)
Y &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; house_price_dataframe[&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;price&amp;#39;&lt;/span&gt;]

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(X)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(Y)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Splitting the data into Training data and Test data&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

X_train, X_test, Y_train, Y_test &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; train_test_split(X, Y, test_size &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #6600EE; font-weight: bold&quot;&gt;0.2&lt;/span&gt;, random_state &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;2&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(X&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;shape, X_train&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;shape, X_test&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;shape)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Model Training&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;XGBoost Regressor&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# loading the model&lt;/span&gt;
model &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; XGBRegressor()

&lt;span style=&quot;color: #888888&quot;&gt;# training the model with X_train&lt;/span&gt;
model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;fit(X_train, Y_train)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Evaluation&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;Prediction on training data&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# accuracy for prediction on training data&lt;/span&gt;
training_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_train)

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(training_data_prediction)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared error&lt;/span&gt;
score_1 &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_train, training_data_prediction)

&lt;span style=&quot;color: #888888&quot;&gt;# Mean Absolute Error&lt;/span&gt;
score_2 &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;mean_absolute_error(Y_train, training_data_prediction)

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared error : &amp;quot;&lt;/span&gt;, score_1)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Mean Absolute Error : &amp;#39;&lt;/span&gt;, score_2)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Visualizing the actual Prices and predicted prices&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;scatter(Y_train, training_data_prediction)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;xlabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;ylabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Predicted Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;title(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Price vs Preicted Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;show()

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Prediction on Test Data &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# accuracy for prediction on test data&lt;/span&gt;
test_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_test)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared error&lt;/span&gt;
score_1 &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_test, test_data_prediction)

&lt;span style=&quot;color: #888888&quot;&gt;# Mean Absolute Error&lt;/span&gt;
score_2 &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;mean_absolute_error(Y_test, test_data_prediction)

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared error : &amp;quot;&lt;/span&gt;, score_1)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Mean Absolute Error : &amp;#39;&lt;/span&gt;, score_2)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/8267642463739949020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/house-price-prediction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8267642463739949020'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/8267642463739949020'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/house-price-prediction.html' title='House Price Prediction'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-2837838074491115814</id><published>2023-11-06T20:31:00.000+05:30</published><updated>2023-11-06T20:31:13.648+05:30</updated><title type='text'>Cars Price Prediction</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;Importing the Dependencies&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;pandas&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;pd&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;matplotlib.pyplot&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;plt&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;seaborn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sns&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn.model_selection&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; train_test_split
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn.linear_model&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; LinearRegression
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn.linear_model&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; Lasso
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold&quot;&gt;sklearn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;import&lt;/span&gt; metrics

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Data Collection and Processing&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# loading the data from csv file to pandas dataframe&lt;/span&gt;
car_dataset &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; pd&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;read_csv(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;/content/car data.csv&amp;#39;&lt;/span&gt;)

&lt;span style=&quot;color: #888888&quot;&gt;# inspecting the first 5 rows of the dataframe&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;head()

&lt;span style=&quot;color: #888888&quot;&gt;# checking the number of rows and columns&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;shape

&lt;span style=&quot;color: #888888&quot;&gt;# getting some information about the dataset&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;info()

&lt;span style=&quot;color: #888888&quot;&gt;# checking the number of missing values&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;isnull()&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;sum()

&lt;span style=&quot;color: #888888&quot;&gt;# checking the distribution of categorical data&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;Fuel_Type&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;value_counts())
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;Seller_Type&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;value_counts())
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;Transmission&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;value_counts())

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Encoding the Categorical Data&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# encoding &amp;quot;Fuel_Type&amp;quot; Column&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;replace({&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Fuel_Type&amp;#39;&lt;/span&gt;:{&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Petrol&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Diesel&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;CNG&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;2&lt;/span&gt;}},inplace&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;)

&lt;span style=&quot;color: #888888&quot;&gt;# encoding &amp;quot;Seller_Type&amp;quot; Column&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;replace({&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Seller_Type&amp;#39;&lt;/span&gt;:{&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Dealer&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Individual&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;1&lt;/span&gt;}},inplace&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;)

&lt;span style=&quot;color: #888888&quot;&gt;# encoding &amp;quot;Transmission&amp;quot; Column&lt;/span&gt;
car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;replace({&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Transmission&amp;#39;&lt;/span&gt;:{&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Manual&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Automatic&amp;#39;&lt;/span&gt;:&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;1&lt;/span&gt;}},inplace&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #007020&quot;&gt;True&lt;/span&gt;)

car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;head()

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Splitting the data and Target&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

X &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; car_dataset&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;drop([&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Car_Name&amp;#39;&lt;/span&gt;,&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Selling_Price&amp;#39;&lt;/span&gt;],axis&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;1&lt;/span&gt;)
Y &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; car_dataset[&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;#39;Selling_Price&amp;#39;&lt;/span&gt;]

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(X)

&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(Y)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Splitting Training and Test data&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

X_train, X_test, Y_train, Y_test &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; train_test_split(X, Y, test_size &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #6600EE; font-weight: bold&quot;&gt;0.1&lt;/span&gt;, random_state&lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000DD; font-weight: bold&quot;&gt;2&lt;/span&gt;)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Model Training&lt;/span&gt;

&lt;span style=&quot;color: #DD4422&quot;&gt;1. Linear Regression&lt;/span&gt;
&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# loading the linear regression model&lt;/span&gt;
lin_reg_model &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; LinearRegression()

lin_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;fit(X_train,Y_train)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Model Evaluation&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# prediction on Training data&lt;/span&gt;
training_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; lin_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_train)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared Error&lt;/span&gt;
error_score &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_train, training_data_prediction)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared Error : &amp;quot;&lt;/span&gt;, error_score)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Visualize the actual prices and Predicted prices&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;scatter(Y_train, training_data_prediction)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;xlabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;ylabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Predicted Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;title(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot; Actual Prices vs Predicted Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;show()

&lt;span style=&quot;color: #888888&quot;&gt;# prediction on Training data&lt;/span&gt;
test_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; lin_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_test)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared Error&lt;/span&gt;
error_score &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_test, test_data_prediction)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared Error : &amp;quot;&lt;/span&gt;, error_score)

plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;scatter(Y_test, test_data_prediction)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;xlabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;ylabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Predicted Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;title(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot; Actual Prices vs Predicted Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;show()

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;2. Lasso Regression&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# loading the linear regression model&lt;/span&gt;
lass_reg_model &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; Lasso()

lass_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;fit(X_train,Y_train)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Model Evaluation&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888&quot;&gt;# prediction on Training data&lt;/span&gt;
training_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; lass_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_train)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared Error&lt;/span&gt;
error_score &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_train, training_data_prediction)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared Error : &amp;quot;&lt;/span&gt;, error_score)

&lt;span style=&quot;color: #DD4422&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Visualize the actual prices and Predicted prices&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;scatter(Y_train, training_data_prediction)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;xlabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;ylabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Predicted Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;title(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot; Actual Prices vs Predicted Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;show()

&lt;span style=&quot;color: #888888&quot;&gt;# prediction on Training data&lt;/span&gt;
test_data_prediction &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; lass_reg_model&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;predict(X_test)

&lt;span style=&quot;color: #888888&quot;&gt;# R squared Error&lt;/span&gt;
error_score &lt;span style=&quot;color: #333333&quot;&gt;=&lt;/span&gt; metrics&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;r2_score(Y_test, test_data_prediction)
&lt;span style=&quot;color: #008800; font-weight: bold&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;R squared Error : &amp;quot;&lt;/span&gt;, error_score)

plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;scatter(Y_test, test_data_prediction)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;xlabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Actual Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;ylabel(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot;Predicted Price&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;title(&lt;span style=&quot;background-color: #fff0f0&quot;&gt;&amp;quot; Actual Prices vs Predicted Prices&amp;quot;&lt;/span&gt;)
plt&lt;span style=&quot;color: #333333&quot;&gt;.&lt;/span&gt;show()
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/2837838074491115814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/cars-price-prediction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2837838074491115814'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2837838074491115814'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/cars-price-prediction.html' title='Cars Price Prediction'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-7038524078913709315</id><published>2023-11-06T20:28:00.001+05:30</published><updated>2023-11-06T20:28:14.024+05:30</updated><title type='text'>Diabetes Prediction Using Python</title><content type='html'>&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: none; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Importing the Dependencies&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;numpy&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;np&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;pandas&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;pd&lt;/span&gt;
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sklearn.preprocessing&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; StandardScaler
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sklearn.model_selection&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; train_test_split
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sklearn&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; svm
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #0e84b5; font-weight: bold;&quot;&gt;sklearn.metrics&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;import&lt;/span&gt; accuracy_score

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Data Collection and Analysis&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;PIMA Diabetes Dataset&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# loading the diabetes dataset to a pandas DataFrame&lt;/span&gt;
diabetes_dataset &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; pd&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;read_csv(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;.../diabetes.csv&#39;&lt;/span&gt;)

pd&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;read_csv&lt;span style=&quot;background-color: #ffaaaa; color: red;&quot;&gt;?&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# printing the first 5 rows of the dataset&lt;/span&gt;
diabetes_dataset&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;head()

&lt;span style=&quot;color: #888888;&quot;&gt;# number of rows and Columns in this dataset&lt;/span&gt;
diabetes_dataset&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;shape

&lt;span style=&quot;color: #888888;&quot;&gt;# getting the statistical measures of the data&lt;/span&gt;
diabetes_dataset&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;describe()

diabetes_dataset[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Outcome&#39;&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;value_counts()

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;0 --&amp;gt; Non-Diabetic&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;1 --&amp;gt; Diabetic&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

diabetes_dataset&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;groupby(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Outcome&#39;&lt;/span&gt;)&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;mean()

&lt;span style=&quot;color: #888888;&quot;&gt;# separating the data and labels&lt;/span&gt;
X &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; diabetes_dataset&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;drop(columns &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Outcome&#39;&lt;/span&gt;, axis&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
Y &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; diabetes_dataset[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Outcome&#39;&lt;/span&gt;]

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(X)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(Y)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Data Standardization&quot;&quot;&quot;&lt;/span&gt;

scaler &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; StandardScaler()

scaler&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;fit(X)

standardized_data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; scaler&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;transform(X)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(standardized_data)

X &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; standardized_data
Y &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; diabetes_dataset[&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Outcome&#39;&lt;/span&gt;]

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(X)
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(Y)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Train Test Split&quot;&quot;&quot;&lt;/span&gt;

X_train, X_test, Y_train, Y_test &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; train_test_split(X,Y, test_size &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #6600ee; font-weight: bold;&quot;&gt;0.2&lt;/span&gt;, stratify&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;Y, random_state&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(X&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;shape, X_train&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;shape, X_test&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;shape)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Training the Model&quot;&quot;&quot;&lt;/span&gt;

classifier &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; svm&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;SVC(kernel&lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;linear&#39;&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;#training the support vector Machine Classifier&lt;/span&gt;
classifier&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;fit(X_train, Y_train)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Model Evaluation&lt;/span&gt;

&lt;span style=&quot;color: #dd4422;&quot;&gt;Accuracy Score&lt;/span&gt;
&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span style=&quot;color: #888888;&quot;&gt;# accuracy score on the training data&lt;/span&gt;
X_train_prediction &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; classifier&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;predict(X_train)
training_data_accuracy &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; accuracy_score(X_train_prediction, Y_train)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Accuracy score of the training data : &#39;&lt;/span&gt;, training_data_accuracy)

&lt;span style=&quot;color: #888888;&quot;&gt;# accuracy score on the test data&lt;/span&gt;
X_test_prediction &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; classifier&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;predict(X_test)
test_data_accuracy &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; accuracy_score(X_test_prediction, Y_test)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;Accuracy score of the test data : &#39;&lt;/span&gt;, test_data_accuracy)

&lt;span style=&quot;color: #dd4422;&quot;&gt;&quot;&quot;&quot;Making a Predictive System&quot;&quot;&quot;&lt;/span&gt;

input_data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; (&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;166&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;72&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;19&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;175&lt;/span&gt;,&lt;span style=&quot;color: #6600ee; font-weight: bold;&quot;&gt;25.8&lt;/span&gt;,&lt;span style=&quot;color: #6600ee; font-weight: bold;&quot;&gt;0.587&lt;/span&gt;,&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;51&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;# changing the input_data to numpy array&lt;/span&gt;
input_data_as_numpy_array &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; np&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;asarray(input_data)

&lt;span style=&quot;color: #888888;&quot;&gt;# reshape the array as we are predicting for one instance&lt;/span&gt;
input_data_reshaped &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; input_data_as_numpy_array&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;reshape(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)

&lt;span style=&quot;color: #888888;&quot;&gt;# standardize the input data&lt;/span&gt;
std_data &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; scaler&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;transform(input_data_reshaped)
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(std_data)

prediction &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; classifier&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;predict(std_data)
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(prediction)

&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (prediction[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;):
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;The person is not diabetic&#39;&lt;/span&gt;)
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;:
  &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&#39;The person is diabetic&#39;&lt;/span&gt;)
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/7038524078913709315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/diabetes-prediction-using-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7038524078913709315'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7038524078913709315'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2023/11/diabetes-prediction-using-python.html' title='Diabetes Prediction Using Python'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-7882523250578441396</id><published>2020-10-04T19:49:00.003+05:30</published><updated>2020-10-10T13:34:51.059+05:30</updated><title type='text'>Extract audio from video file</title><content type='html'>&lt;p&gt;&amp;nbsp;Audio to Video Convertor:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;460&quot; src=&quot;https://www.youtube.com/embed/MRgoBMWEdEY&quot; width=&quot;840&quot;&gt;&lt;/iframe&gt;

&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border-color: gray; border-image: none 100% / 1 / 0 stretch; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;moviepy.editor&lt;/span&gt;
&lt;span style=&quot;color: #f92672;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;tkinter.filedialog&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;press Y to choose the video file to enter:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;input()&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;casefold()&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;y&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;video_path&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;tkinter&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;filedialog&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;askopenfilename()&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;video&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;moviepy&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;editor&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;VideoFileClip(video_path)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;audio&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;video&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;audio&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;audio&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;write_audiofile(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Audio1.mp3&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You need to choose a file to move ahead&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp; Read more about moviepy: &lt;a href=&quot;https://pypi.org/project/moviepy/&quot;&gt;https://pypi.org/project/moviepy/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Read about tkinter: &lt;a href=&quot;https://docs.python.org/3/library/tkinter.html&quot;&gt;https://docs.python.org/3/library/tkinter.html&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/7882523250578441396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/10/extract-audio-from-video-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7882523250578441396'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7882523250578441396'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/10/extract-audio-from-video-file.html' title='Extract audio from video file'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/MRgoBMWEdEY/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-226139713888790334</id><published>2020-09-15T14:27:00.003+05:30</published><updated>2020-09-17T23:59:30.918+05:30</updated><title type='text'>Writing text to an Image</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;460&quot; src=&quot;https://www.youtube.com/embed/1qcyGzj335Q&quot; width=&quot;840&quot; youtube-src-id=&quot;1qcyGzj335Q&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;In this project we are going to learn how we can add text to an image.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This can be used&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;to create an Image quote in Python.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;to create watermark in Python&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;We will be using PIL (pillow) Library in this project&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;To create Image we will use &lt;a href=&quot;https://pillow.readthedocs.io/en/stable/reference/Image.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Image&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#imagedraw-module&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ImageDraw&lt;/span&gt;&lt;/a&gt; module&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;To set fonts we will use &lt;a href=&quot;https://pillow.readthedocs.io/en/stable/reference/ImageFont.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ImageFont&lt;/span&gt;&lt;/a&gt; module&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;and&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;To write text on an image we will use &lt;a href=&quot;https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.multiline_text&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;multiline_text()&lt;/span&gt;&lt;/a&gt; method if &lt;a href=&quot;https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#imagedraw-module&quot; target=&quot;_blank&quot;&gt;ImageDraw&lt;/a&gt; module&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;To Create an Image quote we require a background Image of our own choice on which we can write our quote&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Lets define the tasks to be be performed for this project and work accordingly&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Task 0: Import libraries:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;PIL&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;Image,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageDraw,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageFont&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
 &lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Task 1: Read an Image&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;imgObject&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;Image&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;open(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&#39;full or relative path of your image&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
 Image.open() reads the image and returns an Image object&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Task 2: Set the font of the text you want to add to the image&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;font_object&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageFont&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;truetype(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;E:&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Font&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;sunday-spring&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Sunday Spring.ttf&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;350&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
 Download any font file of your own choice from google and&amp;nbsp; specify the path inside truetype() method of ImageFont class&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;If you font file is with extension .otf then you can call opentype() method of ImageFont class&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;font_object&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageFont&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;opentype(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;E:&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Font&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;sunday-spring&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Sunday Spring.otf&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;350&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Task 3 : Creating ImageDraw object to draw text on an Image &lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;drawing_object&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageDraw&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;Draw(imgObject)&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Inside the ImageDraw.Draw we need to specify image object so that we can bind the drawing pen to the image &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Task 4: Write the text&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;drawing_object&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;multiline_text((&lt;/span&gt;&lt;span style=&quot;color: #ae81ff; font-size: x-large;&quot;&gt;400&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff; font-size: x-large;&quot;&gt;800&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;MV&#39;s Code Guide&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;font&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;font_object,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;fill&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
 &lt;/span&gt;With the drawing object call multiline_text() method to add multiline text or else you can call text() method to add single line text&lt;/p&gt;&lt;p&gt;Inside multiline_text() method :&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;First parameter is xy&lt;/b&gt; coordinate of Top left corner of the text.&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Second Parameter is- &lt;/b&gt;Text to be drawn.&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;b&gt;Third parameter is : font&lt;/b&gt; – An &lt;a class=&quot;reference internal&quot; href=&quot;https://pillow.readthedocs.io/en/stable/reference/ImageFont.html#PIL.ImageFont.ImageFont&quot; title=&quot;PIL.ImageFont.ImageFont&quot;&gt;&lt;code class=&quot;xref py py-class docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;ImageFont&lt;/span&gt;&lt;/code&gt;&lt;/a&gt; instance&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Fourth parameter is : fill&lt;/b&gt; – Color to use for the text.&lt;/li&gt;&lt;/ul&gt;You an also specify other parameter like &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;spacing&lt;/b&gt; – The number of pixels between lines.&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;align&lt;/b&gt; – &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;left&quot;&lt;/span&gt;&lt;/code&gt;, &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;center&quot;&lt;/span&gt;&lt;/code&gt; or &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;right&quot;&lt;/span&gt;&lt;/code&gt;. &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;direction&lt;/b&gt; – Direction of the text. It can be &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;rtl&quot;&lt;/span&gt;&lt;/code&gt; (right to
left), &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;ltr&quot;&lt;/span&gt;&lt;/code&gt; (left to right) or &lt;code class=&quot;docutils literal notranslate&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&quot;ttb&quot;&lt;/span&gt;&lt;/code&gt; (top to bottom).
Requires libraqm.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;Task 5: Save the new Image with text:&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;drawing_object&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;save(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&#39;new_image.jpg&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Full code:&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #75715e; font-size: x-large;&quot;&gt;#Example: Create Image Quote&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;

&lt;span style=&quot;color: #f92672;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;PIL&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;Image,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageDraw,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageFont&lt;/span&gt;

&lt;span style=&quot;color: #75715e;&quot;&gt;# create an image object&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;#imgObject = Image.new(&quot;RGB&quot;, (500, 500), (255, 255, 255))&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;imgObject&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;Image&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;open(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Path of Image&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;# get a font object&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;font_object&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageFont&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;truetype(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;E:&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Font&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;sunday-spring&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Sunday Spring.ttf&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;350&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;# get a drawing context&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;drawing_object&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ImageDraw&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;Draw(imgObject)&lt;/span&gt;

&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;# draw multiline text&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;drawing_object&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;multiline_text((&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;400&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;800&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;),&lt;/span&gt; &lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;MV&#39;s Code Guide&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;font&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;font_object,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;fill&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;))&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;# save the image&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;drawing_object&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;save(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;new_image.jpg&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
 &lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/226139713888790334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/writing-text-to-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/226139713888790334'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/226139713888790334'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/writing-text-to-image.html' title='Writing text to an Image'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/1qcyGzj335Q/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-1076079494957652514</id><published>2020-09-13T17:24:00.004+05:30</published><updated>2020-12-27T20:03:15.870+05:30</updated><title type='text'>Extract Text From Image Using Python</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/s0xERJmW92o&quot; width=&quot;840&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We are going to use pytesseract and pillow library to work on this project!&lt;/p&gt;&lt;p&gt;Before you start coding, you need to complete three tasks:&lt;/p&gt;&lt;p&gt;1. Click on the link below and install tesseract-OCR&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/UB-Mannheim/tesseract/wiki&quot;&gt;https://github.com/UB-Mannheim/tesseract/wiki&lt;/a&gt;&lt;/p&gt;&lt;p&gt;After you install the setup successfully, take a note of where you are saving the file because we need that path in our code. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. Install pytesseract by using command : pip install pytesseract&lt;/p&gt;&lt;p&gt;3. Install pillow by using command : pip install pillow&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Source Code: &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;pytesseract&lt;/span&gt;
&lt;span style=&quot;color: #f92672;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;PIL&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;Image&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;pytesseract&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;pytesseract&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;tesseract_cmd&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6db74;&quot;&gt;r&#39;C:\Program Files\Tesseract-OCR\tesseract.exe&#39;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;Image&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;open(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;logo.png&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;pytesseract&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;image_to_string(value)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Extracted Data is: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;text)&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;Notice that if you want to add full path, you need to add double slash (\\) instead of single slash (\) in you path&lt;/p&gt;&lt;p&gt;For Example: If your path looks like this: D:\Python_Program\my_Image.jpg&lt;/p&gt;&lt;p&gt;Then replace \ with \\&lt;/p&gt;&lt;p&gt;something like : D:\\Python_Program\\my_Image.jpg&lt;/p&gt;&lt;p&gt;Or&lt;/p&gt;&lt;p&gt;Add&amp;nbsp; alphabet &#39;r&#39; before your string &lt;br /&gt;example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;span&gt;&lt;span&gt;r&#39;C:\Program Files\Tesseract-OCR\tesseract.exe&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: times;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;and then you are good to go! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/1076079494957652514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/extract-text-from-image-using-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/1076079494957652514'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/1076079494957652514'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/extract-text-from-image-using-python.html' title='Extract Text From Image Using Python'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/s0xERJmW92o/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-4389736994901371709</id><published>2020-09-10T22:15:00.006+05:30</published><updated>2020-09-10T23:42:08.791+05:30</updated><title type='text'>Spell Checker with Python</title><content type='html'>&lt;p&gt;&amp;nbsp;We can use two different packages to create spell checker&lt;/p&gt;&lt;p&gt;1. Using &lt;a href=&quot;https://textblob.readthedocs.io/en/dev/quickstart.html&quot; rel=&quot;&quot; target=&quot;_blank&quot;&gt;textblob&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2. Using &lt;a href=&quot;https://pypi.org/project/pyspellchecker/&quot; target=&quot;_blank&quot;&gt;pyspellchecker&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Video Explanation:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/JE7qXaF806Q&quot; width=&quot;840&quot; youtube-src-id=&quot;JE7qXaF806Q&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: medium;&quot;&gt;Source Code:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;Using textblob:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;textblob&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;TextBlob&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Incorrct&quot;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;corrected_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;TextBlob(misspelled_word)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;correct()&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Misspelled Word:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,misspelled_word)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Corrected Word: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,corrected_word)&lt;/span&gt;

&lt;span style=&quot;color: #75715e;&quot;&gt;# you can also use list of misspelled words&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;========================================================&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word_list&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Incorrct&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Mang&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Summay&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Watr&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Appl&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;word&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word_list:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;correct_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;TextBlob(word)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;correct()&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Misspelled Word:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,misspelled_word_list)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Corrected Word: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,correct_word)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Using pyspellchecker:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;spellchecker&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;SpellChecker&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;SpellChecker()&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;unknown([&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Incorrct&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Summry&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Mondy&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Spellng&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;Pyhon&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(type(misspelled_word))&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;word&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Corrected word is &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;correction(word))&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Candidate words:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;candidates(word))&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;You can play around this code and make changes according to your need!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;You can also read a text file and use this code to check the spellings in the file&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: large;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;textblob&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;TextBlob&lt;/span&gt;
&lt;span style=&quot;color: #f92672;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;spellchecker&lt;/span&gt; &lt;span style=&quot;color: #66d9ef;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;SpellChecker&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;open(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;demo.txt&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;r&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;str(f&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;read())&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(data)&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;# you can also use list of misspelled words&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;**************************Using textblob**************************************&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word_list&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;split()&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;word&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word_list:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;correct_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;TextBlob(word)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;correct()&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;Word: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,word)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;------------------------------&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Corrected Word: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,correct_word)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;================================&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;***************************Using pyspellchecker***********************************&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;SpellChecker()&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;unknown(misspelled_word_list)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(type(misspelled_word))&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;word&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;misspelled_word:&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;word: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,word)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;--------------------------------------------&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Corrected word is &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;correction(word))&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;--------------------------------------------&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Candidate words:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,spell&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;candidates(word))&lt;/span&gt;
    &lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;================================&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;close()&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;619&quot; data-original-width=&quot;803&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGFao9MslxQ2P8bh_tOmIiuV2kPRchnZ4SIUuz04IsfWVb2GavGe3SXPeR2k0ODM_GYQAiwx_9fPbzQWQ44E2b4EX6cSLwRc-ZSi4LQgT8ZEtYxb9p1aJrMxbEyG1AuFLC9zQyQyLXDDc/s16000/111111111111111.png&quot; /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAl9GRbq5o1y6atrquZKOG8DuUMPOZGACuwt8QjXM5WVROvOpssOboufDE2EcePSLgtDKr-HYdb7A317RODLE7fKkzwzJqryogsfYnmi1O-9C1i_m-Pzo6KSZzKJI-lYz-SMhEu_WNnx4/s803/111111111111111.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;619&quot; data-original-width=&quot;803&quot; src=&quot;&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-size: large;&quot;&gt;output:&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Artifcial intelligence (AI), someties called macine intelligence, is intellience demonstated by machines, unlike the
naural intelligence dislayed by humans and animls.



**************************Using textblob**************************************

Word:  Artifcial
------------------------------
Corrected Word:  Artificial

================================

Word:  intelligence
------------------------------
Corrected Word:  intelligence

================================

Word:  (AI),
------------------------------
Corrected Word:  (of),

================================

Word:  someties
------------------------------
Corrected Word:  sometimes

================================

Word:  called
------------------------------
Corrected Word:  called

================================

Word:  macine
------------------------------
Corrected Word:  machine

================================

Word:  intelligence,
------------------------------
Corrected Word:  intelligence,

================================

Word:  is
------------------------------
Corrected Word:  is

================================

Word:  intellience
------------------------------
Corrected Word:  intelligence

================================

Word:  demonstated
------------------------------
Corrected Word:  demonstrated

================================

Word:  by
------------------------------
Corrected Word:  by

================================

Word:  machines,
------------------------------
Corrected Word:  machines,

================================

Word:  unlike
------------------------------
Corrected Word:  unlike

================================

Word:  the
------------------------------
Corrected Word:  the

================================

Word:  naural
------------------------------
Corrected Word:  natural

================================

Word:  intelligence
------------------------------
Corrected Word:  intelligence

================================

Word:  dislayed
------------------------------
Corrected Word:  displayed

================================

Word:  by
------------------------------
Corrected Word:  by

================================

Word:  humans
------------------------------
Corrected Word:  humans

================================

Word:  and
------------------------------
Corrected Word:  and

================================

Word:  animls.
------------------------------
Corrected Word:  animals.

================================

***************************Using pyspellchecker***********************************
&amp;lt;class &#39;set&#39;&amp;gt;

word:  (ai),
--------------------------------------------
Corrected word is  (ai),
--------------------------------------------
Candidate words: {&#39;(ai),&#39;}

================================

word:  someties
--------------------------------------------
Corrected word is  sometimes
--------------------------------------------
Candidate words: {&#39;sometimes&#39;}

================================

word:  machines,
--------------------------------------------
Corrected word is  machines
--------------------------------------------
Candidate words: {&#39;machines&#39;}

================================

word:  intelligence,
--------------------------------------------
Corrected word is  intelligence
--------------------------------------------
Candidate words: {&#39;intelligences&#39;, &#39;intelligence&#39;}

================================

word:  demonstated
--------------------------------------------
Corrected word is  demonstrated
--------------------------------------------
Candidate words: {&#39;demonstrated&#39;}

================================

word:  naural
--------------------------------------------
Corrected word is  natural
--------------------------------------------
Candidate words: {&#39;natural&#39;, &#39;aural&#39;, &#39;neural&#39;}

================================

word:  dislayed
--------------------------------------------
Corrected word is  displayed
--------------------------------------------
Candidate words: {&#39;displayed&#39;, &#39;dismayed&#39;}

================================

word:  animls.
--------------------------------------------
Corrected word is  animals
--------------------------------------------
Candidate words: {&#39;animist&#39;, &#39;animus&#39;, &#39;animals&#39;, &#39;animism&#39;}

================================

word:  macine
--------------------------------------------
Corrected word is  machine
--------------------------------------------
Candidate words: {&#39;machine&#39;, &#39;maine&#39;, &#39;racine&#39;, &#39;maxine&#39;, &#39;marine&#39;}

================================

word:  intellience
--------------------------------------------
Corrected word is  intelligence
--------------------------------------------
Candidate words: {&#39;intelligence&#39;}

================================

word:  artifcial
--------------------------------------------
Corrected word is  artificial
--------------------------------------------
Candidate words: {&#39;artifical&#39;, &#39;artificial&#39;}

================================
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/4389736994901371709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/spell-checker-with-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/4389736994901371709'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/4389736994901371709'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/09/spell-checker-with-python.html' title='Spell Checker with Python'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JE7qXaF806Q/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-7931248642403586948</id><published>2020-08-22T17:04:00.004+05:30</published><updated>2020-08-22T17:14:26.668+05:30</updated><title type='text'>Counting vowels in a string</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/BKCVTz8Aklc&quot; width=&quot;840&quot; youtube-src-id=&quot;BKCVTz8Aklc&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;b&gt;Using count() method:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;vowels&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;e&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;i&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;o&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;u&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;# Using Count() Method&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;vowels:&lt;/span&gt;
		&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1:&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(ch)&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;{} occurred {} times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;format(ch,string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;count(ch)))&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt; 

&lt;b&gt;Without using count() method:
&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;vowels&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;e&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;i&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;o&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;u&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;{}&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;vowels:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d[ch]&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;get(ch,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(d)&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;key,value&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sorted(d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;items()):&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(key,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;occurred&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,value,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/7931248642403586948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/counting-vowels-in-string.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7931248642403586948'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7931248642403586948'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/counting-vowels-in-string.html' title='Counting vowels in a string'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/BKCVTz8Aklc/default.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-5399623850125531417</id><published>2020-08-21T20:30:00.009+05:30</published><updated>2021-09-01T21:17:25.720+05:30</updated><title type='text'>Counting number of occurrences of each character in a string</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;460&quot; src=&quot;https://www.youtube.com/embed/3bC-3ikDp5g&quot; width=&quot;830&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Using count() method:&lt;/span&gt;&lt;/p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(39, 40, 34); border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;l:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(x)&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(x,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;occurred&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;count(x),&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Without using count() method:&lt;/p&gt;
&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(39, 40, 34); border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;{}&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d[x]&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;get(x,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(d)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;items())&lt;/span&gt;
&lt;span style=&quot;color: #75715e;&quot;&gt;# for meaningful output&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;key,value&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sorted(d&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;items()):&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(key,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;occurred&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,value,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Question by Subscriber:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;How to ignore special characters like ? , . etc&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;If you want to ignore special characters and focus on the alphabets and digits only, then you can do that by some extra work&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;You&amp;nbsp; can either import string class to get a set of all characters that you need to focus on, or you can manually add the set of characters you particularly want to focus on.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;we will name them as &lt;span style=&quot;color: red;&quot;&gt;valid_characters&lt;/span&gt;&lt;br /&gt;Here goes the code:&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;


&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(39, 40, 34); border-color: gray; border-image: none 100% / 1 / 0 stretch; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;valid_characters&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;set(string&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;ascii_letters&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digits)&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;valid_characters:&lt;/span&gt;
		&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;l:&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(x)&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(x,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;occurred&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;count(x),&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt; &lt;span style=&quot;font-size: large;&quot;&gt;Output:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_VksPBXEilasEBJ_67AXbUwz0-0picOQug7vJ_NgFBKlfJyT9t4JQT6rgouSAmezRi-ymUP7tZC-q6xhv_L52uHVfCBzBv0fxQgTI8cmgtyXxc1TgfZW8pMDTeRHjCNvbcQucby77LaE/s1106/aaaa.png&quot; style=&quot;font-size: x-large; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;303&quot; data-original-width=&quot;1106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_VksPBXEilasEBJ_67AXbUwz0-0picOQug7vJ_NgFBKlfJyT9t4JQT6rgouSAmezRi-ymUP7tZC-q6xhv_L52uHVfCBzBv0fxQgTI8cmgtyXxc1TgfZW8pMDTeRHjCNvbcQucby77LaE/s16000/aaaa.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: large;&quot;&gt;or&lt;/span&gt;&lt;br /&gt; &lt;/p&gt;

&lt;!--HTML generated using hilite.me--&gt;&lt;div style=&quot;background: none 0% 0% repeat scroll rgb(39, 40, 34); border-color: gray; border-image: none 100% / 1 / 0 stretch; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;valid_characters&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;set(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;0123456789&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;valid_characters:&lt;/span&gt;
		&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;l:&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;l&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(x)&lt;/span&gt;
			&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(x,&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;occurred&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;count(x),&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;times&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;

&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #ff00fe;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Hope you like it ..!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/5399623850125531417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/counting-number-of-occurrences-of-each.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5399623850125531417'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5399623850125531417'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/counting-number-of-occurrences-of-each.html' title='Counting number of occurrences of each character in a string'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/3bC-3ikDp5g/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-7160582800845872949</id><published>2020-08-13T20:26:00.006+05:30</published><updated>2020-08-20T17:09:15.349+05:30</updated><title type='text'>Removing duplicate characters from the string</title><content type='html'>&lt;p&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/Ubw4tIJw81c&quot; width=&quot;846&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;b&gt;Sample Input&lt;/b&gt;: sssssssssssssssddddeeeeggggggghhhhh&lt;/p&gt;&lt;p&gt;&lt;b&gt;Output&lt;/b&gt;: sdegh&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;1st way:&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result after removing duplicate characters: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;2nd way:&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;

&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;list_data:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(character)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;join(list_data)&lt;/span&gt;		
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result after removing duplicate characters: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/7160582800845872949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/removing-duplicate-characters-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7160582800845872949'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7160582800845872949'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/removing-duplicate-characters-from.html' title='Removing duplicate characters from the string'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Ubw4tIJw81c/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-4980805667685435890</id><published>2020-08-13T20:15:00.003+05:30</published><updated>2020-08-13T20:22:33.557+05:30</updated><title type='text'>Python Program for specific requirement-2</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Sample Input: d8s2b5r6&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Output:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dlsubgrx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;isalpha():&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digit&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;int(character)&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;new_character&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;chr(ord(previous)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digit)&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;new_character&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result : &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/4980805667685435890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/python-program-for-specific-requirement_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/4980805667685435890'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/4980805667685435890'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/python-program-for-specific-requirement_13.html' title='Python Program for specific requirement-2'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-3701182523350620121</id><published>2020-08-13T19:47:00.006+05:30</published><updated>2020-08-13T20:22:46.735+05:30</updated><title type='text'>Python Program for specific requirements</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Requirement:&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;Sample Input: s4b6c5a2d9&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output: ssssbbbbbbcccccaaddddddddd&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;isalpha():&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;alphabet&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digit&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;int(character)&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;alphabet&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digit&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span&gt;Requirement:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;Sample Input:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;ssssbbbbbbcccccaaddddddddd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output: &lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;4s6b5c2a9d &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data[&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;]&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character_count&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string_data):&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data[i]&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character_count&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character_count&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;str(character_count)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data[i]&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;character_count&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string_data)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;str(character_count)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;previous&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/3701182523350620121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/python-program-for-specific-requirement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/3701182523350620121'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/3701182523350620121'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/python-program-for-specific-requirement.html' title='Python Program for specific requirements'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-2512271168638033905</id><published>2020-08-13T19:38:00.000+05:30</published><updated>2020-08-13T19:38:14.653+05:30</updated><title type='text'>Sort characters in a string</title><content type='html'>&lt;p&gt;&amp;nbsp;Assume input string contains only alphabet symbols and digits.&lt;/p&gt;&lt;p&gt;We need to write a program to sort characters of the string were we will sort alphabets first and then digits will follow&lt;/p&gt;&lt;p&gt;Sample Input: C8N9A2U6R5B7&lt;/p&gt;&lt;p&gt;Output: ABCNRU256789 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter some alphanumeric string to sort: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;alphabets&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digits&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data:&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;ch&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;isalpha():&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;alphabets&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(ch)&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;digits&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(ch)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;join(sorted(alphabets)&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;sorted(digits))&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string_data)&lt;/span&gt;

&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result after Sorting: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/2512271168638033905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/sort-characters-in-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2512271168638033905'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/2512271168638033905'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/sort-characters-in-string.html' title='Sort characters in a string'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-6723290124428804958</id><published>2020-08-13T19:14:00.000+05:30</published><updated>2020-08-13T19:14:09.507+05:30</updated><title type='text'>Merge two strings</title><content type='html'>&lt;h3 style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Merge two strings by taking characters alternatively from each string&lt;/h3&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Sample string 1 :&amp;nbsp; PYTHON&lt;br /&gt;Sample string 2 :&amp;nbsp; python&lt;br /&gt;Output:&amp;nbsp; PpYyTtHhOoNn&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Let us understand the two scenarios of this problem&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Scenario1&lt;/b&gt;:&amp;nbsp; If both the strings are of same length:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string1&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter first string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Enter second string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i,j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #75715e;&quot;&gt;# object initialization using Tuple Unpacking&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string1)&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string2):&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string1[i]&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string2[j]&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered first string : &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string1)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered second string : &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result after alternate merge: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
 &lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Scenario 2:&lt;/b&gt;&amp;nbsp; If the strings have different length: &lt;!--HTML generated using hilite.me--&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string1&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter first string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Enter second string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i,j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #75715e;&quot;&gt;# object initialization using Tuple Unpacking&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string1)&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;or&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string2):&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string1):&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string1[i]&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string2):&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string2[j]&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;j&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered first string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string1)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;You entered second string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,string2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Final result after alternate merge: &lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/6723290124428804958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/merge-two-strings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/6723290124428804958'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/6723290124428804958'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/merge-two-strings.html' title='Merge two strings'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-5715694552490114323</id><published>2020-08-13T16:52:00.004+05:30</published><updated>2020-08-13T16:54:57.878+05:30</updated><title type='text'>Print characters present at even and odd index separately</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;1&lt;/u&gt;&lt;u&gt;st Way :&lt;/u&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Characters present at even index position: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string_data):&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(string_data[i])&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Characters present at odd index position: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(string_data):&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(string_data[i])&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;u&gt;2nd Way:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Characters present at even index position: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(string_data[::&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt; &lt;span style=&quot;color: #75715e;&quot;&gt;# or&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(string_data[&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Characters present at odd index position: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(string_data[&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/5715694552490114323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/print-characters-present-at-even-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5715694552490114323'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5715694552490114323'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/print-characters-present-at-even-and.html' title='Print characters present at even and odd index separately'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-5374168179375613892</id><published>2020-08-13T15:09:00.002+05:30</published><updated>2020-08-13T15:25:10.747+05:30</updated><title type='text'>Reverse internal content of every second word</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;Sample Input: one two three four five six seven eight&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output: one owt three ruof five xis seven thgie&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;split()&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(list1)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;len(list1):&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(list1[i])&lt;/span&gt;
	&lt;span style=&quot;color: #66d9ef;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;:&lt;/span&gt;
		&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(list1[i][::&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt;&lt;span style=&quot;color: #75715e;&quot;&gt;# Reversing word and then adding to list2&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(list2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;join(list2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;The string you entered:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sep&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;The result after reversing order of words in the string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sep&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/5374168179375613892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/reverse-internal-content-of-every.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5374168179375613892'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/5374168179375613892'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/reverse-internal-content-of-every.html' title='Reverse internal content of every second word'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7178430688497932595.post-7492539027198826591</id><published>2020-08-13T14:58:00.005+05:30</published><updated>2020-08-20T17:10:09.830+05:30</updated><title type='text'>Reverse the internal content of each word</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/kqkM_HsgA8I&quot; width=&quot;846&quot; youtube-src-id=&quot;kqkM_HsgA8I&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Sample Input: Hello Python&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Output: olleH nohtyP&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;!--HTML generated using hilite.me--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: rgb(39, 40, 34) none repeat scroll 0% 0%; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672; font-size: x-large;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;input(&lt;/span&gt;&lt;span style=&quot;color: #e6db74; font-size: x-large;&quot;&gt;&quot;Enter a string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2; font-size: x-large;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;split()&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(list1)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;[]&lt;/span&gt;
&lt;span style=&quot;color: #66d9ef;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;word&lt;/span&gt; &lt;span style=&quot;color: #f92672;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;list1:&lt;/span&gt;
	&lt;span style=&quot;color: #f8f8f2;&quot;&gt;list2&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;append(word[::&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;])&lt;/span&gt; &lt;span style=&quot;color: #75715e;&quot;&gt;# Reversing word and then adding to list2&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(list2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;result&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;join(list2)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;The string you entered:&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;string_data,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sep&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #f8f8f2;&quot;&gt;print(&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;The result after reversing order of words in the string: &quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;result,&lt;/span&gt; &lt;span style=&quot;color: #f8f8f2;&quot;&gt;sep&lt;/span&gt;&lt;span style=&quot;color: #f92672;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ae81ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;
 &lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://mvcodeguide.blogspot.com/feeds/7492539027198826591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/reverse-internal-content-of-each-word.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7492539027198826591'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7178430688497932595/posts/default/7492539027198826591'/><link rel='alternate' type='text/html' href='https://mvcodeguide.blogspot.com/2020/08/reverse-internal-content-of-each-word.html' title='Reverse the internal content of each word'/><author><name>Mayuri Vohra</name><uri>http://www.blogger.com/profile/06091861193400280473</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNkuvittFvD3otCyRroFqHbekDtMovQwU8Z9nJ0-zznsRVdwDElTVv9EynJ8rQHOqgIcxH-PXBz59d37IRvbJqyboTI0wwv243Mun3bnUBMJNPY8lSfDzIoQe7Wq2TJQ/s220/0021e7a7-2c91-4e1b-a0c0-688f3ddf29cb.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/kqkM_HsgA8I/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>