<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohindra Jain on Medium]]></title>
        <description><![CDATA[Stories by Mohindra Jain on Medium]]></description>
        <link>https://medium.com/@mahijain9211?source=rss-f89f7bbd4c5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tHcHoL0dDli2LZa5FcN6bg.jpeg</url>
            <title>Stories by Mohindra Jain on Medium</title>
            <link>https://medium.com/@mahijain9211?source=rss-f89f7bbd4c5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:14:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahijain9211/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond describe(): A Practical User Experience with drishtipy for Pandas Data Profiling]]></title>
            <link>https://medium.com/@mahijain9211/beyond-describe-a-practical-user-experience-with-drishtipy-for-pandas-data-profiling-0b5a7a252c7a?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b5a7a252c7a</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-quality]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Sat, 15 Aug 2026 15:21:40 GMT</pubDate>
            <atom:updated>2026-08-17T07:18:51.075Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Q7kmjcThRywUltx2TR13A.png" /></figure><p>DrishtiPy is available on PyPI and GitHub.<a href="https://pypi.org/project/drishtipy/">https://pypi.org/project/drishtipy/</a></p><p>When I receive a new dataset, the first challenge is rarely loading it into pandas.</p><p>The real challenge begins afterward.</p><p>I want to understand the structure of the data, identify missing values, find duplicates and outliers, check whether the data types make sense, look for potential PII, understand correlations, and determine whether the dataset is ready for an ML or ETL workflow.</p><p>With pandas, all of this is certainly possible. But the process can quickly become repetitive. I often find myself writing several commands just to answer a few basic questions about a DataFrame.</p><p>This is where <strong>drishtipy</strong> takes an interesting approach.</p><p>Rather than replacing pandas or introducing a completely different workflow, <strong>drishtipy</strong> adds a profiling layer directly to the DataFrame through a familiar <strong>.profile</strong> accessor. Its goal is simple: help you move from <strong>&quot;What is in this dataset?&quot;</strong> to <strong>&quot;What should I do with it?&quot;</strong> more quickly.</p><p>“<em>Drishti” (दृष्टि) is a Hindi/Sanskrit-origin word meaning “vision,” “sight,” “perspective,” or “way of seeing.”</em></p><h3>A Familiar pandas Experience</h3><p>Getting started doesn’t require learning a new data structure.</p><p>After installation:</p><pre>pip install drishtipy</pre><p>I can continue using pandas as usual:</p><pre>import pandas as pd<br>import drishtipy<br>or<br>from drishtipy import profile_of  # ✅ full autocomplete + type checking<br><br>df = pd.read_csv(&quot;data.csv&quot;)</pre><p>Then the profiling interface is available directly from the DataFrame:</p><pre>df.profile</pre><p>From there, I can explore different aspects of the dataset:</p><pre># Complete profile<br>df.profile.info() or profile_of(df).info()<br><br># Data structure<br>df.profile.schema()<br><br># Statistical analysis<br>df.profile.statistics()<br><br># Data quality analysis<br>df.profile.quality()<br><br># ML readiness &amp; suggestions<br>df.profile.ml()<br><br># ETL readiness &amp; cleaning issues<br>df.profile.etl()<br><br># Overall data quality score<br>df.profile.quality_score()<br><br># Data quality alerts<br>df.profile.alerts()<br><br># Potential PII detection<br>df.profile.pii()<br><br># Correlation analysis<br>df.profile.correlations(by=&quot;pairs&quot;)<br><br># Generate a shareable HTML report<br>df.profile.html(&quot;report.html&quot;)<br><br># Compares two DataFrames and generates an HTML before/after report<br>df.profile.compare_html(df2, path=&quot;compare.html&quot;)</pre><p>What I like about this approach is that the API feels like an extension of pandas rather than a separate profiling system.</p><h3>Starting with the Schema</h3><p>Before analyzing a dataset, I usually want to know what I&#39;m actually dealing with.</p><p>The schema profiler provides a concise view of the DataFrame:</p><pre>df.profile.schema()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKpw1LoidbOO2sZ8uBrPBQ.png" /></figure><p>It includes column names, pandas data types, non-null counts, missing values, uniqueness information, and memory usage.</p><p>For a new dataset, this is often the first useful checkpoint.</p><p>It answers questions such as:</p><ul><li>Which columns are missing data?</li><li>Which columns have very high uniqueness?</li><li>Which columns consume the most memory?</li><li>Are the pandas data types what I expected?</li></ul><p>Instead of immediately jumping into analysis, I can first establish a baseline understanding of the dataset.</p><h3>One API, Three Ways to Look at Columns</h3><p>One of the features I particularly appreciate is the ability to focus profiling on different types of columns.</p><p>The supported options are:</p><pre>All<br>Numeric<br>Categorical</pre><p>For example:</p><pre>df.profile.schema(&quot;All&quot;)<br>df.profile.schema(&quot;Numeric&quot;)<br>df.profile.schema(&quot;Categorical&quot;)</pre><p>The same concept can be applied to other profiling operations:</p><pre>df.profile.alerts(&quot;All&quot;)<br>df.profile.alerts(&quot;Numeric&quot;)<br>df.profile.alerts(&quot;Categorical&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tERFObWatR1cmH9_lYZmKQ.png" /></figure><p>This becomes particularly useful with wide datasets.</p><p>If I am investigating salary, age, quantity, price, or other numerical features, I may not want categorical columns mixed into that investigation.</p><p>Likewise, when reviewing city, department, category, or other categorical fields, I can focus specifically on those columns.</p><p>The underlying profiling API supports All, Numeric, and Categorical as column-type filters.</p><p>It&#39;s a small API decision, but it makes the workflow more focused.</p><h3>Statistics Without Building the Report Myself</h3><p>Once I understand the structure, I usually want to understand the distributions.</p><p>That&#39;s where:</p><pre>df.profile.statistics()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIIvcAWLvpwc8JGg0PTg9A.png" /></figure><blockquote><em>‘Dtype’, ‘Count’, ‘Missing Count’, ‘Mean’, ‘Median’, ‘Std’, ‘Min’, ‘Q1’, ‘Q2’, ‘Q3’, ‘95%’, ‘99%’, ‘Max’, ‘Range’, ‘IQR’, ‘Skewness’, ‘Kurtosis’, ‘Mode’, ‘Mode Frequency’, ‘Geometric Mean’, ‘Harmonic Mean’, ‘RMS’, ‘CV %’, ‘MAD’, ‘Z Outlier Count’</em></blockquote><p>comes in.</p><p>For numerical columns, the statistical profile includes measures such as count, mean, median, standard deviation, minimum, quartiles, 95th and 99th percentiles, maximum, range, IQR, skewness, and kurtosis.</p><p>For other column types, mode and mode frequency are also included.</p><p>This isn&#39;t about replacing pandas.describe().</p><p>The value is having a broader profiling workflow where statistical analysis sits alongside quality, ML, ETL, and other checks.</p><h3>Finding Data Quality Problems Early</h3><p>Statistics can tell me what the data looks like.</p><p>Data-quality profiling helps tell me <strong>what might be wrong with it</strong>.</p><pre>df.profile.quality()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9U8Bmf9Ak_unRgWRacRVg.png" /></figure><blockquote>‘Column’, ‘Duplicate Count’, ‘Missing Count’, ‘Zero Count’, ‘Outlier Count’, ‘Outlier %’</blockquote><p>The quality analysis covers common issues such as:</p><ul><li>Missing values</li><li>Duplicate values</li><li>Zero values</li><li>Outliers</li></ul><p>For numerical columns, it also provides IQR-based outlier counts and percentages.</p><p>This is particularly useful during the first pass over unfamiliar data.</p><p>Instead of discovering quality problems much later during modeling or ETL, I can identify many of them before moving further downstream.</p><h3>A Quality Score for a Quick Health Check</h3><p>Sometimes I don&#39;t need the full report immediately.</p><p>I just want to know:</p><p><strong>How healthy does this dataset look?</strong></p><p>drishtipy provides:</p><pre>df.profile.quality_score()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPLFAnssnfQve3V1pY9DSA.png" /></figure><p>The score considers five areas:</p><ul><li>Missing Values</li><li>Duplicates</li><li>Outliers</li><li>Data Types</li><li>Invalid Values</li></ul><p>It can provide an overall score as well as a per-column view.</p><p>I would not use a single number as the final definition of data quality. Data quality is contextual, and different projects have different requirements.</p><p>But as a quick starting point, a quality score can help prioritize where to investigate first.</p><h3>Alerts: From Metrics to Action</h3><p>One of the more practical features is the alerts system.</p><pre>df.profile.alerts()</pre><p>Instead of reviewing every profiling section independently, alerts bring potential problems together and classify them by severity.</p><p>The documented alert types include missing values, duplicate rows, outliers, constant and near-constant columns, skewed distributions, high cardinality, possible ID columns, incorrect data types, empty strings, whitespace issues, zero-heavy columns, highly correlated pairs, and potential PII.</p><p>This changes the experience slightly.</p><p>Rather than asking:</p><blockquote><em>&quot;What does this column look like?&quot;</em></blockquote><p>I can also ask:</p><blockquote><em>&quot;What should I be concerned about?&quot;</em></blockquote><p>And with column-type filtering, I can narrow that investigation:</p><pre>df.profile.alerts(&quot;All&quot;)<br>df.profile.alerts(&quot;Numeric&quot;)<br>df.profile.alerts(&quot;Categorical&quot;)</pre><p>That is especially helpful when working with a large number of columns.</p><h3>PII Detection Is a Different Kind of Data Quality</h3><p>Not every important data problem is statistical.</p><p>Sometimes the most important question is whether a dataset contains information that should not be exposed or shared.</p><p>drishtipy provides a PII profiling function:</p><pre>df.profile.pii()</pre><p>It can detect potential email addresses, phone numbers, IP addresses, Aadhaar-shaped values, PAN-like values, possible names, and possible addresses.</p><p>An important detail is that some of these detections are heuristic. A column identified as a possible ID, PAN, name, or address should therefore be reviewed rather than automatically treated as confirmed PII.</p><p>For situations where I need a masked version of the data, there is also:</p><pre>masked_df = df.profile.pii(mask=True)</pre><p>The original DataFrame is not modified; the masking operation returns a copy.</p><h3>Correlations Before Modeling</h3><p>Correlation analysis is another common step in exploratory data analysis and machine learning.</p><p>With drishtipy:</p><pre>df.profile.correlations()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPBYIyDSeHFxO7wZ_s8I0w.png" /></figure><p>I can also request a pair-oriented result:</p><pre>df.profile.correlations(by=&quot;pairs&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wpq2ISfS4RMy20uQ45r9Gw.png" /></figure><p>Or focus on stronger relationships:</p><pre>df.profile.correlations(<br>    by=&quot;pairs&quot;,<br>    threshold=0.8<br>)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBNaW_RbiTo8tV5B4FN2ng.png" /></figure><blockquote>Pearson, Spearman, and Kendall methods are supported.</blockquote><p>This can be useful when looking for strongly related numerical features and potential multicollinearity candidates before modeling.</p><h3>Is the Dataset Ready for Machine Learning?</h3><p>A clean-looking dataset isn&#39;t necessarily a model-ready dataset.</p><p>drishtipy provides an ML-readiness analysis:</p><pre>df.profile.ml()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gfc-OiVZB-K4i1CQVwlFtw.png" /></figure><blockquote>‘Column’, ‘Dtype’, ‘Feature Type’, ‘Unique Count’, ‘Unique %’, ‘Missing %’, ‘Variance’, ‘Skewness’, ‘Outlier %’, ‘Cardinality’, ‘Encoding Suggestion’, ‘Scaling Suggestion’, ‘Transformation’, ‘Feature Status’</blockquote><p>It examines factors such as feature type, missing percentage, variance, skewness, outlier percentage, cardinality, and provides suggestions related to encoding, scaling, and transformation.</p><p>I see this as a useful pre-modeling checkpoint.</p><p>It doesn&#39;t replace feature engineering or domain-specific validation, but it can highlight areas that deserve attention before training begins.</p><h3>ETL Readiness: Looking at Data as Pipeline Input</h3><p>For ETL workflows, the question is slightly different.</p><p>The important issue isn&#39;t only whether the dataset is statistically interesting. It&#39;s whether the data is clean enough to move through a pipeline reliably.</p><p>That&#39;s where:</p><pre>df.profile.etl()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnwSLiV5WMoL4VVjeylfTQ.png" /></figure><blockquote>‘Column’, ‘Dtype’, ‘Rows’, ‘Missing Count’, ‘Missing %’, ‘Unique Count’, ‘Unique %’, ‘Duplicate Count’, ‘Duplicate %’, ‘Issue’, ‘Issue Count’, ‘Recommended Action’, ‘ETL Status’, ‘Space Issue Count’, ‘Empty String Count’, ‘Special Character Count’, ‘Negative Count’, ‘Zero Count’, ‘Outlier Count’, ‘Outlier %’</blockquote><p>can help.</p><p>The ETL profile examines missing values, duplicates, empty strings, whitespace issues, special characters, zeros, negative values, and outliers. It also provides an issue summary, status, and recommended action.</p><p>For production-oriented data workflows, this perspective is valuable because small inconsistencies can become larger pipeline problems later.</p><h3>The Before-and-After Problem</h3><p>Data cleaning is rarely a single operation.</p><p>A typical workflow looks more like:</p><pre>Raw Data<br>   ↓<br>Cleaning<br>   ↓<br>Transformation<br>   ↓<br>Feature Engineering<br>   ↓<br>Final Dataset</pre><p>After all those transformations, one question inevitably comes up:</p><p><strong>What actually changed?</strong></p><p>drishtipy includes DataFrame comparison functionality:</p><pre>df.profile.compare(df2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-t-xlg9VUUBxDF2QmLhpQ.png" /></figure><p>It supports comparisons at dataset, schema, quality, and ML levels.</p><p>There is also a compact summary that can show whether columns changed, were added, removed, or remained unchanged.</p><p>For ETL and preprocessing workflows, this can provide a useful validation step between transformations.</p><h3>Turning Profiling Results into a Report</h3><p>Not everyone wants to inspect raw DataFrames in a notebook.</p><p>For sharing results, drishtipy can generate standalone HTML reports:</p><pre>df.profile.html(&quot;profile_report.html&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3do4lmrpUhBDU5koqZ12fA.png" /></figure><p>Comparison reports are also supported:</p><pre>df.profile.compare_html(<br>    df2,<br>    path=&quot;comparison_report.html&quot;<br>)</pre><p>This makes it easier to share profiling results with teammates or stakeholders without requiring them to reproduce the analysis in the same Python environment.</p><h3>Working with Large CSV Files</h3><p>Large files introduce a different problem: memory.</p><p>drishtipy provides a CSV profiling workflow based on chunking and sampling:</p><pre>from drishtipy import DataProfiler<br><br>profiler = DataProfiler.from_csv(<br>    &quot;huge_dataset.csv&quot;,<br>    sample_size=100_000,<br>    chunksize=50_000,<br>    random_state=42<br>)</pre><p>The source row count can be determined exactly, while statistical and ML profiling can be performed on a sample when sampling is used.</p><p>That makes the approach more practical for large CSV files where loading the complete dataset into memory isn&#39;t desirable.</p><h3>The Part I Like Most: It Stays pandas-Friendly</h3><p>Perhaps the most important design decision is that profiling results remain pandas-friendly.</p><p>For example:</p><pre>report = df.profile.quality()</pre><p>I can continue working with the result using familiar pandas operations:</p><pre>report.sort_values(<br>    &quot;Missing Count&quot;,<br>    ascending=False<br>)</pre><p>I can filter it:</p><pre>report[<br>    report[&quot;Missing Count&quot;] &gt; 0<br>]</pre><p>Or export it:</p><pre>report.to_csv(<br>    &quot;quality_report.csv&quot;,<br>    index=False<br>)</pre><p>So the profiling layer doesn&#39;t force me to abandon the pandas workflow I already know.</p><h3>Where I See drishtipy Being Useful</h3><p>From my perspective, the toolkit fits naturally into several stages of a data workflow:</p><p><strong>Exploratory Data Analysis</strong><br>Understand the structure and statistical characteristics of a new dataset.</p><p><strong>Data Quality</strong><br>Identify missing values, duplicates, outliers, and other quality issues.</p><p><strong>Data Governance</strong><br>Look for potential PII before sharing or publishing datasets.</p><p><strong>Machine Learning</strong><br>Review features for missingness, variance, skewness, cardinality, and preprocessing requirements.</p><p><strong>ETL</strong><br>Identify data-cleaning issues before they enter a pipeline.</p><p><strong>Data Validation</strong><br>Compare datasets before and after transformations.</p><p><strong>Reporting</strong><br>Generate standalone HTML reports that can be shared with others.</p><h3>Final Thoughts</h3><p>What I find interesting about drishtipy is that it doesn&#39;t try to make pandas irrelevant.</p><p>It takes a workflow that many data professionals already perform manually and gives it a consistent interface.</p><p>The experience can be as simple as:</p><pre>df.profile.schema()<br>df.profile.quality()<br>df.profile.alerts()</pre><p>and, when I need more targeted analysis:</p><pre>df.profile.schema(&quot;All&quot;)<br>df.profile.schema(&quot;Numeric&quot;)<br>df.profile.schema(&quot;Categorical&quot;)<br><br>df.profile.alerts(&quot;All&quot;)<br>df.profile.alerts(&quot;Numeric&quot;)<br>df.profile.alerts(&quot;Categorical&quot;)</pre><p>From there, I can move deeper into statistics, quality scoring, PII detection, correlations, ML readiness, ETL readiness, comparison, and reporting.</p><p>For me, that is the real value of the tool.</p><p>It reduces the amount of repetitive code required to answer the questions that naturally come up when working with a new dataset.</p><p>The workflow becomes straightforward:</p><blockquote><strong><em>Load the data. Profile it. Find the problems. Understand the data. Then make better decisions.</em></strong></blockquote><p>And that is exactly where a lightweight profiling tool can add value to an existing pandas workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b5a7a252c7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sarvam AI: India’s Push Toward Sovereign AI — Capabilities, Models, Pros & Cons]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mahijain9211/sarvam-ai-indias-push-toward-sovereign-ai-capabilities-models-pros-cons-1e3119c155f8?source=rss-f89f7bbd4c5a------2"><img src="https://cdn-images-1.medium.com/max/1536/1*lzZXrY9l4Bur5KrQwd5gtg.png" width="1536"></a></p><p class="medium-feed-snippet">Artificial intelligence is no longer just a global race &#x2014; it&#x2019;s increasingly becoming a regional necessity. One of the most notable players&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mahijain9211/sarvam-ai-indias-push-toward-sovereign-ai-capabilities-models-pros-cons-1e3119c155f8?source=rss-f89f7bbd4c5a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mahijain9211/sarvam-ai-indias-push-toward-sovereign-ai-capabilities-models-pros-cons-1e3119c155f8?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e3119c155f8</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Tue, 05 May 2026 06:04:06 GMT</pubDate>
            <atom:updated>2026-05-05T06:10:27.934Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[ 12 Powerful AI Python Libraries You Can Install with pip (With Real Examples)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mahijain9211/12-powerful-ai-python-libraries-you-can-install-with-pip-with-real-examples-1c15d1cc0b4e?source=rss-f89f7bbd4c5a------2"><img src="https://cdn-images-1.medium.com/max/1536/1*GeQ3DT-7LeL0SCEVpn3RgQ.png" width="1536"></a></p><p class="medium-feed-snippet">Artificial Intelligence isn&#x2019;t just for researchers anymore. With the right Python libraries, you can build chatbots, image generators&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mahijain9211/12-powerful-ai-python-libraries-you-can-install-with-pip-with-real-examples-1c15d1cc0b4e?source=rss-f89f7bbd4c5a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mahijain9211/12-powerful-ai-python-libraries-you-can-install-with-pip-with-real-examples-1c15d1cc0b4e?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c15d1cc0b4e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 14:07:22 GMT</pubDate>
            <atom:updated>2026-03-24T14:12:59.869Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[ Demystifying xs() in Pandas: The Secret Tool for Cross-Sectional Selection]]></title>
            <link>https://medium.com/@mahijain9211/demystifying-xs-in-pandas-the-secret-tool-for-cross-sectional-selection-591851c07d5b?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/591851c07d5b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Mon, 07 Apr 2025 09:09:52 GMT</pubDate>
            <atom:updated>2025-04-07T09:23:30.120Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever worked with multi-level indexes in pandas and felt a bit overwhelmed, meet your new best friend: xs().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fp6oy7GjwBEJgQzwbWgMA.png" /><figcaption>xs() in Pandas</figcaption></figure><p>Pandas is a powerful Python library for data analysis, and when you work with hierarchical (MultiIndex) DataFrames, things can get a little tricky. That’s where the .xs() method shines—it helps you slice through multi-level indexes effortlessly.</p><p>In this article, you’ll learn what xs() is, how it works, and why it’s such a powerful tool for data manipulation.</p><h4>🧠 What is xs()?</h4><p>.xs() stands for cross section. It allows you to select data from a specific level in a hierarchical (MultiIndex) structure—either for rows or columns.</p><p>Think of it as a shortcut to cut through one level of your data hierarchy and grab exactly what you need.</p><h4>🧪 The Problem</h4><p>Imagine a DataFrame with MultiIndex columns for year and month, like this:</p><pre>import pandas as pd<br><br>columns = pd.MultiIndex.from_tuples([<br>    (&#39;2024&#39;, &#39;Nov&#39;), (&#39;2024&#39;, &#39;Dec&#39;),<br>    (&#39;2025&#39;, &#39;Jan&#39;), (&#39;2025&#39;, &#39;Feb&#39;),<br>    (&#39;2025&#39;, &#39;Mar&#39;)<br>])<br><br>data = [<br>    [20, 30, 40, 50, 60],<br>    [10, 20, 22, 30, 35]<br>]<br><br>df = pd.DataFrame(data, index=[&#39;S1&#39;, &#39;S2&#39;], columns=columns)<br>print(df)<br>Output:<br><br>     2024       2025          <br>      Nov Dec  Jan Feb Mar<br>S1    20  30   40  50  60<br>S2    10  20   22  30  35<br></pre><h4>✅ Use Case: Get All &#39;Feb&#39; Values</h4><p>Now, say you want to pull all the &#39;Feb&#39; values across all years.</p><p>Using xs():</p><pre>feb_data = df.xs(&#39;Feb&#39;, axis=1, level=1)<br>print(feb_data)<br>Output:<br><br>    2025<br>S1    50<br>S2    30<br></pre><p>💡 Easy, right? Without xs(), you&#39;d have to filter the columns manually, which can get messy with many levels.</p><h4><strong>🎯 How Does It Work?</strong></h4><p>Let’s break it down:</p><pre>df.xs(&#39;Feb&#39;, axis=1, level=1)<br></pre><ul><li>&#39;Feb&#39; → the label you want to select</li><li>axis=1 → work on columns (use axis=0 for rows)</li><li>level=1 → target the month level (since level 0 is year)</li></ul><h4>📌 Other Real-World Use Cases</h4><p>1. Select a Row by Index Level:</p><pre>df2.xs(&#39;California&#39;, level=&#39;State&#39;, axis=0)<br></pre><p>2. Get All Data for a Specific Year:</p><pre>df.xs(&#39;2025&#39;, axis=1, level=0)<br></pre><p>3. Combine with loc or iloc:<br>You can even combine xs() with other slicing:</p><pre>df.xs(&#39;Feb&#39;, axis=1, level=1).loc[&#39;S1&#39;]</pre><h4>⚠️ When Not to Use .xs()</h4><p>If your DataFrame doesn’t use a MultiIndex, .xs() isn’t needed and won’t work properly.</p><p>For flat (single-level) headers like &#39;2025_Feb&#39;, use:</p><p>df[[col for col in df.columns if &#39;Feb&#39; in col]]</p><h4>🏁 Final Thoughts</h4><p>The .xs() method is a clean and elegant way to slice through MultiIndex DataFrames in pandas. Whether you’re working with time series, hierarchical data, or pivot tables, it’s a tool worth mastering.</p><p>Next time you see a MultiIndex and feel overwhelmed—remember: xs() is your shortcut to clarity.</p><h4>✨ Like this article?</h4><p>Follow me for more practical tips on Python, pandas, and real-world data science workflows. Let&#39;s make data simple—one line of code at a time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=591851c07d5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PyCon US 2025: A Look Ahead at the Premier Python Conference]]></title>
            <link>https://medium.com/@mahijain9211/pycon-us-2025-a-look-ahead-at-the-premier-python-conference-afc2e82c9044?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/afc2e82c9044</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[towards-data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Fri, 20 Dec 2024 17:04:53 GMT</pubDate>
            <atom:updated>2024-12-20T17:04:53.844Z</atom:updated>
            <content:encoded><![CDATA[<p>Mark your calendars! PyCon US 2025, the largest annual gathering for Python enthusiasts, developers, and contributors, promises to be a landmark event. This exciting conference will take place from May 14 to May 22, 2025, in Pittsburgh, Pennsylvania, at the David L. Lawrence Convention Center. Here&#39;s a detailed guide on what to expect and why you should be part of this vibrant Python community event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yScHV0gYVTsqnl2iR0-5vQ.jpeg" /><figcaption>pycon US 2025</figcaption></figure><h4><strong>Event Overview</strong></h4><ul><li>Location: David L. Lawrence Convention Center, Pittsburgh, PA</li><li>Tutorials: May 14–15, 2025</li><li>Sponsor Presentations: May 15, 2025</li><li>Main Conference: May 16–18, 2025</li><li>Job Fair: May 18, 2025</li><li>Sprints: May 19–22, 2025</li></ul><p><strong>Registration</strong>: <a href="https://us.pycon.org/2025/">Click here to register for PyCon US 2025</a></p><p>Early bird tickets are now available for the first 500 registrations, so grab yours soon to secure discounted rates!</p><h4>1. Keynote Speakers: Inspiring the Python Community</h4><p>PyCon US 2025 will feature an incredible lineup of keynote speakers, including:</p><ul><li>Guido van Rossum, the creator of Python, who will provide insights into Python’s evolution and its role in shaping the future of technology.</li><li>Talks on Python in AI and quantum computing, showcasing the language&#39;s adaptability to cutting-edge innovation.</li><li>Industry case studies on Python applications in healthcare, finance, space exploration, and more.</li></ul><p>These talks will energize attendees to explore new possibilities with Python.</p><h4>2. Python 3.13: A Sneak Peek</h4><p>Get an exclusive preview of Python 3.13, set to revolutionize the programming landscape. Key highlights include:</p><ul><li><strong>Performance Boosts:</strong> Making Python even faster and more efficient.</li><li><strong>Enhanced Async Capabilities:</strong> Streamlining asynchronous programming.</li><li><strong>Security Enhancements:</strong> Strengthening Python for enterprise use cases.</li></ul><p>Workshops and discussions will give participants a chance to test out these features before the official release.</p><h4>3. AI and Machine Learning: Python at the Forefront</h4><p>Dive deep into Python&#39;s role in shaping artificial intelligence with sessions on:</p><ul><li>Building and deploying Large Language Models (LLMs) and generative AI tools.</li><li>Practical use cases for AutoGPT, LangChain, and other popular frameworks.</li><li>AI on Edge Devices: Leveraging Python for IoT and mobile AI solutions.</li></ul><p>These sessions will highlight Python’s unmatched flexibility in AI development.</p><h4>4. Developer Sprints: Contribute to Open Source</h4><p>The Developer Sprints are an integral part of PyCon, offering attendees the chance to contribute to Python&#39;s vibrant ecosystem. Projects will include updates to:</p><ul><li>Django: Improved tools for web development.</li><li>NumPy and SciPy: Advancements in scientific computing.</li><li>PyTorch and TensorFlow: Cutting-edge integrations for AI and machine learning.</li></ul><p>Whether you&#39;re a first-time contributor or a seasoned pro, the sprints are an incredible opportunity to make a difference.</p><h4>5. Diversity and Inclusion: A Welcoming Community for All</h4><p>PyCon US 2025 continues its commitment to fostering diversity with initiatives like:</p><ul><li>Financial Aid: Helping underrepresented groups attend the conference.</li><li>Mentorship Programs: Connecting newcomers with experienced Python developers.</li><li>Diversity Panels: Discussions on creating an inclusive tech community.</li></ul><p>These efforts ensure PyCon is a welcoming and inspiring event for everyone.</p><h4>6. Networking Opportunities and Expo Hall</h4><p>The conference offers unparalleled networking opportunities through:</p><ul><li>Startup Alley: Discover innovative Python-based startups.</li><li>Career Fair: Meet top tech companies hiring Python professionals.</li><li>Community Meetups: Connect with others who share your interests, from AI to web development.</li></ul><p>Additionally, the Expo Hall will showcase:</p><ul><li>Live Demos of Python tools and frameworks.</li><li>Hardware Innovations featuring Python-powered robotics and IoT devices.</li><li>Book Signings with renowned Python authors.</li></ul><h4>7. Health and Safety Guidelines</h4><p>PyCon US prioritizes the safety of its attendees. Health and safety guidelines will be in place to ensure a safe environment for all participants.</p><p>Please note: PyCon US 2025 will be fully in-person with no live streaming of the main conference.</p><h4>Why You Should Attend PyCon US 2025</h4><ul><li>Learn: Gain insights into the latest trends and advancements in Python.</li><li>Contribute: Participate in sprints and give back to the community.</li><li>Network: Connect with industry leaders, developers, and organizations.</li><li>Get Inspired: Discover real-world success stories and innovative applications of Python.</li></ul><h4>Register Today</h4><p>Don’t miss your chance to be part of this incredible event.</p><p>👉 <a href="https://us.pycon.org/2025/">Register now</a> for PyCon US 2025</p><p>Book your hotel early and take advantage of the early bird discount to secure your spot at the year’s biggest Python celebration.</p><p>We can’t wait to see you in Pittsburgh!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afc2e82c9044" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Boost Python Performance with Numba ]]></title>
            <link>https://medium.com/@mahijain9211/boost-python-performance-with-numba-13fbbf9b3bc1?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/13fbbf9b3bc1</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[fastapi]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 16:10:40 GMT</pubDate>
            <atom:updated>2024-11-19T16:10:40.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*Ff1utl76tzKFBHlayGXpew.png" /><figcaption><em>Python function optimized with Numba for faster execution.</em></figcaption></figure><p>Python is a fantastic language for its simplicity and flexibility, but when it comes to performance, it often falls short compared to compiled languages like C or C++. That’s where <strong>Numba</strong> comes in — a tool that turbocharges your Python code by turning it into machine code, achieving speeds comparable to C. In this short article, we’ll explore how Numba works and how you can use it to accelerate your code.</p><h4>What is Numba?</h4><p>Numba is an open-source library that uses <strong>just-in-time (JIT) compilation</strong> to optimize Python functions. It works particularly well for numerical computations and loops, making it a perfect choice for data science, machine learning, and scientific computing tasks.</p><h4>Why Use Numba?</h4><p>1. <strong>Speed:</strong> Numba-compiled functions are often **100x faster** than pure Python.<br>2. <strong>Ease of Use</strong>: No need to learn a new language — just decorate your Python functions.<br>3. <strong>GPU Support: </strong>Offload heavy computations to a GPU with minimal effort.</p><h4>Why Numba Is Still Effective</h4><ol><li><strong>Performance Gains</strong>:<br>Numba provides significant speedups for CPU-bound tasks like numerical loops, matrix operations, and simulations. It achieves speeds comparable to languages like C or Fortran without requiring you to rewrite your code.</li><li><strong>Seamless NumPy Integration</strong>:<br>Numba is optimized for NumPy, making it a great choice for operations on arrays. Instead of relying on external libraries or frameworks, you can enhance the performance of your existing NumPy-based code with minimal changes.</li><li><strong>GPU Acceleration</strong>:<br>With Numba’s CUDA support, you can tap into the computational power of GPUs. This is particularly valuable for deep learning, simulations, and real-time processing, where GPUs outperform CPUs.</li><li><strong>Ease of Use</strong>:<br>Its <strong>@jit</strong> decorator makes optimization straightforward, and you don’t need to learn another language or framework. The tool’s low barrier to entry is a big advantage.</li><li><strong>Open Source and Actively Maintained</strong>:<br>Numba is actively developed and supported by the Python community and Anaconda, Inc., ensuring regular updates and improvements.</li></ol><h4>How to Get Started</h4><p>First, install Numba:</p><pre>pip install numbap</pre><p>Then, use the <a href="http://twitter.com/jit">@jit</a> decorator to optimize your function:</p><pre>from numba import jit<br>import numpy as np<br><br>@jit<br>def compute_sum(arr):<br>    total = 0<br>    for x in arr:<br>        total += x<br>    return total<br><br># Test it!<br>data = np.random.rand(1_000_000)<br>%timeit compute_sum(data)  # Blazing fast compared to standard Python</pre><h3>Advanced Features</h3><ol><li><strong>Parallel Execution</strong>: Leverage multiple CPU cores:</li></ol><pre>@jit(parallel=True)<br>def parallel_sum(arr):<br>    return np.sum(arr)</pre><p><strong>2. GPU Acceleration</strong>: Perform computations on your GPU:</p><pre>from numba import cuda<br><br>@cuda.jit<br>def add_arrays(a, b, c):<br>    i = cuda.grid(1)<br>    if i &lt; a.size:<br>        c[i] = a[i] + b[i]</pre><p><strong>3. NumPy Optimization</strong>: Speed up matrix operations and more.</p><pre>import numpy as np<br>from numba import njit<br><br>@njit<br>def matrix_multiply(A, B):<br>    rows, cols = A.shape[0], B.shape[1]<br>    result = np.zeros((rows, cols))<br>    for i in range(rows):<br>        for j in range(cols):<br>            for k in range(A.shape[1]):<br>                result[i, j] += A[i, k] * B[k, j]<br>    return result<br><br># Test the performance<br>A = np.random.rand(500, 500)<br>B = np.random.rand(500, 500)<br><br>%timeit matrix_multiply(A, B)  # Accelerated by Numba<br>%timeit np.dot(A, B)          # NumPy&#39;s built-in implementation</pre><h4>When Not to Use Numba</h4><ul><li>If your code is <strong>I/O-bound</strong> or uses advanced Python features like dictionaries or classes.</li><li>For <strong>simple scripts</strong>, where the compilation overhead outweighs the speed benefits.</li></ul><h4>Limitations to Consider</h4><p>While Numba is excellent, there are cases where other tools might be more effective:</p><ol><li><strong>Broader Python Features</strong>:<br>Numba only supports a subset of Python, so if your code relies on complex data structures (like dictionaries or classes), Numba might not work.</li><li><strong>Compilation Overhead</strong>:<br>For short scripts or small datasets, the time taken to compile the function might outweigh the performance benefits.</li><li><strong>Alternative Tools</strong>:<br>For some applications, libraries like <strong>Cython</strong>, <strong>PyPy</strong>, or <strong>TensorFlow</strong> may offer better performance or flexibility.</li></ol><h4>Is Numba Still Worth Using?</h4><p>Absolutely. If your workload involves numerical operations or array processing, Numba is a powerful tool that continues to deliver. It’s especially effective for researchers, data scientists, and developers looking to optimize Python without leaving its ecosystem.</p><p>By combining <strong>ease of use</strong>, <strong>GPU support</strong>, and <strong>cross-platform capabilities</strong>, Numba remains a top choice for performance optimization in Python.</p><h4>Conclusion</h4><p>Numba is a powerful way to optimize Python for compute-heavy tasks. With just a few lines of code, you can achieve significant performance improvements. Whether you’re working with loops, NumPy arrays, or even GPU acceleration, Numba can help you write faster and more efficient Python code.</p><p>Try it today and experience the speed boost firsthand!</p><p>For more details visit: <a href="https://numba.pydata.org/">https://numba.pydata.org/</a> <a href="https://cgexamtracker.com/python/accelerate-your-python-code-with-numba/">https://cgexamtracker.com/python/accelerate-your-python-code-with-numba/</a></p><p><em>Liked this article? Follow for more Python tips and tricks!</em> 🐍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13fbbf9b3bc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[License Plate Detection from Video Files Using YOLO and EasyOCR]]></title>
            <link>https://medium.com/@mahijain9211/license-plate-detection-from-video-files-using-yolo-and-easyocr-6b647f0c94d5?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b647f0c94d5</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 04:31:25 GMT</pubDate>
            <atom:updated>2024-11-01T04:34:57.614Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will explore how to implement license plate detection from video files using YOLO (You Only Look Once) and EasyOCR (Optical Character Recognition) in Python. This approach utilizes deep learning for real-time detection and recognition of license plates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pYRR40ZMMiWW-Q3DxnzIMQ.jpeg" /><figcaption>License Plate detection from video file</figcaption></figure><p><strong>Note:</strong><br>For a detailed, step-by-step guide on model creation for license plate detection, including data preparation, annotation, and YOLO training, please refer to my previous article: <a href="https://medium.com/@mahijain9211/comprehensive-guide-to-real-time-car-license-plate-detection-with-yolo-bt-ee9aa4bd9913">Comprehensive Guide to Real-Time Car License Plate Detection with YOLO</a>. This guide covers everything from dataset setup to exporting the model in .bt and .tflite formats.</p><h3>Prerequisites</h3><p>Before we begin, ensure you have the following Python packages installed:</p><pre>pip install opencv-python ultralytics easyocr Pillow numpy</pre><h3>Implementation Steps</h3><h4>Step 1: Initialize Libraries</h4><p>We will start by importing the necessary libraries. We’ll use OpenCV for video processing, YOLO for object detection, and EasyOCR for reading the text on the detected license plates.</p><pre>import cv2<br>from ultralytics import YOLO<br>import easyocr<br>from PIL import Image<br>import numpy as np<br><br># Initialize EasyOCR reader<br>reader = easyocr.Reader([&#39;en&#39;], gpu=False)<br><br># Load your YOLO model (replace with your model&#39;s path)<br>model = YOLO(&#39;best_float32.tflite&#39;, task=&#39;detect&#39;)<br><br># Open the video file (replace with your video file path)<br>video_path = &#39;sample4.mp4&#39;<br>cap = cv2.VideoCapture(video_path)<br><br># Create a VideoWriter object (optional, if you want to save the output)<br>output_path = &#39;output_video.mp4&#39;<br>fourcc = cv2.VideoWriter_fourcc(*&#39;mp4v&#39;)<br>out = cv2.VideoWriter(output_path, fourcc, 30.0, (640, 480))  # Adjust frame size if necessary</pre><h4>Step 2: Process Video Frames</h4><p>We will read each frame from the video file, process it to detect license plates, and then apply OCR to recognize the text on the plates. To improve performance, we can skip processing every third frame.</p><pre># Frame skipping factor (adjust as needed for performance)<br>frame_skip = 3  # Skip every 3rd frame<br>frame_count = 0<br><br>while cap.isOpened():<br>    ret, frame = cap.read()  # Read a frame from the video<br>    if not ret:<br>        break  # Exit loop if there are no frames left<br><br>    # Skip frames<br>    if frame_count % frame_skip != 0:<br>        frame_count += 1<br>        continue  # Skip processing this frame<br><br>    # Resize the frame (optional, adjust size as needed)<br>    frame = cv2.resize(frame, (640, 480))  # Resize to 640x480<br><br>    # Make predictions on the current frame<br>    results = model.predict(source=frame)<br><br>    # Iterate over results and draw predictions<br>    for result in results:<br>        boxes = result.boxes  # Get the boxes predicted by the model<br>        for box in boxes:<br>            class_id = int(box.cls)  # Get the class ID<br>            confidence = box.conf.item()  # Get confidence score<br>            coordinates = box.xyxy[0]  # Get box coordinates as a tensor<br><br>            # Extract and convert box coordinates to integers<br>            x1, y1, x2, y2 = map(int, coordinates.tolist())  # Convert tensor to list and then to int<br><br>            # Draw the box on the frame<br>            cv2.rectangle(frame, (x1, y1), (x2, y2), (0, 255, 0), 2)  # Draw rectangle<br>            <br>            # Try to apply OCR on detected region<br>            try:<br>                # Ensure coordinates are within frame bounds<br>                r0 = max(0, x1)<br>                r1 = max(0, y1)<br>                r2 = min(frame.shape[1], x2)<br>                r3 = min(frame.shape[0], y2)<br><br>                # Crop license plate region<br>                plate_region = frame[r1:r3, r0:r2]<br><br>                # Convert to format compatible with EasyOCR<br>                plate_image = Image.fromarray(cv2.cvtColor(plate_region, cv2.COLOR_BGR2RGB))<br>                plate_array = np.array(plate_image)<br><br>                # Use EasyOCR to read text from plate<br>                plate_number = reader.readtext(plate_array)<br>                concat_number = &#39; &#39;.join([number[1] for number in plate_number])<br>                number_conf = np.mean([number[2] for number in plate_number])<br><br>                # Draw the detected text on the frame<br>                cv2.putText(<br>                    img=frame,<br>                    text=f&quot;Plate: {concat_number} ({number_conf:.2f})&quot;,<br>                    org=(r0, r1 - 10),<br>                    fontFace=cv2.FONT_HERSHEY_SIMPLEX,<br>                    fontScale=0.7,<br>                    color=(0, 0, 255),<br>                    thickness=2<br>                )<br><br>            except Exception as e:<br>                print(f&quot;OCR Error: {e}&quot;)<br>                pass<br><br>    # Show the frame with detections<br>    cv2.imshow(&#39;Detections&#39;, frame)<br><br>    # Write the frame to the output video (optional)<br>    out.write(frame)<br>    <br>    if cv2.waitKey(1) &amp; 0xFF == ord(&#39;q&#39;):<br>        break  # Exit loop if &#39;q&#39; is pressed<br><br>    frame_count += 1  # Increment frame count<br>    <br># Release resources<br>cap.release()<br>out.release()  # Release the VideoWriter object if used<br>cv2.destroyAllWindows()</pre><h4>Explanation of the Code</h4><ol><li><strong>Initialize EasyOCR</strong>: The EasyOCR reader is initialized for English text recognition.</li><li><strong>Load YOLO Model</strong>: The YOLO model is loaded from a specified path. Make sure to replace this path with your model’s path.</li><li><strong>Read Video Frames</strong>: The video file is opened using OpenCV, and a VideoWriter is initialized if you want to save the output.</li><li><strong>Frame Processing</strong>: Each frame is read and resized. The model predicts license plate locations.</li><li><strong>Draw Predictions</strong>: Detected bounding boxes are drawn on the frames. The region containing the license plate is cropped for OCR processing.</li><li><strong>Apply OCR</strong>: EasyOCR reads the text from the cropped license plate image. The detected text and confidence score are displayed on the frame.</li><li><strong>Output Video</strong>: The processed frames can be displayed in a window and optionally saved to an output video file.</li></ol><h3>Conclusion</h3><p>This code provides a comprehensive approach to detecting and reading license plates from video files using YOLO and EasyOCR. By following these steps, you can implement a similar system for your own applications.</p><p>Feel free to adjust parameters and enhance the model based on your specific needs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b647f0c94d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comprehensive Guide to Real-Time Car License Plate Detection with YOLO, .bt]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mahijain9211/comprehensive-guide-to-real-time-car-license-plate-detection-with-yolo-bt-ee9aa4bd9913?source=rss-f89f7bbd4c5a------2"><img src="https://cdn-images-1.medium.com/max/1189/1*8vd4_Sw8cN8lQdKf3lzlrQ.jpeg" width="1189"></a></p><p class="medium-feed-snippet">License plate detection has broad applications, from automated traffic management to secure entry systems. This guide walks you through&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mahijain9211/comprehensive-guide-to-real-time-car-license-plate-detection-with-yolo-bt-ee9aa4bd9913?source=rss-f89f7bbd4c5a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mahijain9211/comprehensive-guide-to-real-time-car-license-plate-detection-with-yolo-bt-ee9aa4bd9913?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee9aa4bd9913</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 04:08:52 GMT</pubDate>
            <atom:updated>2024-11-01T04:35:41.112Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Write Clean and Neat Python Code in 2024]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mahijain9211/how-to-write-clean-and-neat-python-code-in-2024-f77ae2238cad?source=rss-f89f7bbd4c5a------2"><img src="https://cdn-images-1.medium.com/max/600/1*XszWpIaflPBn3D_TVPQs_Q.jpeg" width="600"></a></p><p class="medium-feed-snippet">Writing clean and organized Python code is important for making sure your programs are easy to read, maintain, and debug. In 2024, there&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mahijain9211/how-to-write-clean-and-neat-python-code-in-2024-f77ae2238cad?source=rss-f89f7bbd4c5a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mahijain9211/how-to-write-clean-and-neat-python-code-in-2024-f77ae2238cad?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f77ae2238cad</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Wed, 16 Oct 2024 16:20:24 GMT</pubDate>
            <atom:updated>2024-10-16T16:20:24.097Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Flask vs. FastAPI: Which Python Framework is Right for Your Next Project?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@mahijain9211/flask-vs-fastapi-which-python-framework-is-right-for-your-next-project-76f32567a694?source=rss-f89f7bbd4c5a------2"><img src="https://cdn-images-1.medium.com/max/612/1*YIiX00VQ0b3dH93ljq_ELg.jpeg" width="612"></a></p><p class="medium-feed-snippet">When it comes to building web applications and APIs in Python, two frameworks often come up: Flask and FastAPI. While both are lightweight&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mahijain9211/flask-vs-fastapi-which-python-framework-is-right-for-your-next-project-76f32567a694?source=rss-f89f7bbd4c5a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mahijain9211/flask-vs-fastapi-which-python-framework-is-right-for-your-next-project-76f32567a694?source=rss-f89f7bbd4c5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/76f32567a694</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Mohindra Jain]]></dc:creator>
            <pubDate>Wed, 16 Oct 2024 02:49:58 GMT</pubDate>
            <atom:updated>2024-10-16T02:49:58.212Z</atom:updated>
        </item>
    </channel>
</rss>