<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DCAI Community</title>
    <description>The latest articles on DEV Community by DCAI Community (@dcai_community).</description>
    <link>https://dev.to/dcai_community</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F601062%2Fdc8b3b15-f5b2-4b21-b89e-b86703c0343e.png</url>
      <title>DEV Community: DCAI Community</title>
      <link>https://dev.to/dcai_community</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dcai_community"/>
    <language>en</language>
    <item>
      <title>Coding Wonderland: Contribute to YData Profiling and YData Synthetic in this Open Source Advent</title>
      <dc:creator>DCAI Community</dc:creator>
      <pubDate>Tue, 05 Dec 2023 13:50:51 +0000</pubDate>
      <link>https://dev.to/dcaicommunity/coding-wonderland-contribute-to-ydata-profiling-and-ydata-synthetic-in-this-advent-of-code-305d</link>
      <guid>https://dev.to/dcaicommunity/coding-wonderland-contribute-to-ydata-profiling-and-ydata-synthetic-in-this-advent-of-code-305d</guid>
      <description>&lt;p&gt;The holiday season is upon us and so is the fantastic &lt;a href="https://zilliz.com/advent-of-code"&gt;Open Source Advent Game&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;To escape the data scientists' naughty list, the Data-Centric AI Community decided to come together and contribute to our favorite data science open-source projects -- &lt;a href="https://github.com/ydataai/ydata-profiling"&gt;ydata-profiling&lt;/a&gt; and &lt;a href="https://github.com/ydataai/ydata-synthetic"&gt;ydata-synthetic&lt;/a&gt; -- and here's why you should to:&lt;/p&gt;

&lt;p&gt;For each contribution, you can gather points and have the chance to win a fantastic swag package from &lt;a href="https://zilliz.com/blog/advent-of-code-for-open-source"&gt;Zilliz and all the remaining participants&lt;/a&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Not sure how to contribute? Don't hang up your socks just yet!
&lt;/h2&gt;

&lt;p&gt;You don't need to be a super-experienced programmer to start contributing! In open-source, all is fair game and there are plenty of ways to help the developer community:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Send us your North ⭐️:&lt;/strong&gt; &lt;em&gt;"On the first day of Christmas, my true contributor gave to me..."&lt;/em&gt; a star in my GitHub tree! 🎵 If you love these projects too, star &lt;a href="https://github.com/ydataai/ydata-profiling"&gt;ydata-profiling&lt;/a&gt; or &lt;a href="https://github.com/ydataai/ydata-synthetic"&gt;ydata-synthetic&lt;/a&gt; and &lt;a href="https://www.linkedin.com/posts/felipegollnick_eda-in-python-eng-below-estou-chocado-activity-7125206579791953920-MsyU?utm_source=share&amp;amp;utm_medium=member_desktop"&gt;let your friends know why you love it so much&lt;/a&gt;!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Leave some footprints in the Snow with awesome tutorials&lt;/strong&gt; ❄️ Other developers will surely appreciate your guidance and learnings. Why not contribute with a short blogpost? Here some of the best contributions the community is making with ydata-profiling -- &lt;a href="https://bryanpaget.medium.com/ydata-profiling-71b23ef5ff07"&gt;YData Profiling: Streamlining Data Analysis&lt;/a&gt; --  and ydata-synthetic -- &lt;a href="https://medium.datadriveninvestor.com/fraud-machine-learning-modelling-improvement-with-synthetic-data-2fb5b8a71f16"&gt;Fraud Machine Learning Modeling Improvement with Synthetic Data&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How about a Holly Jolly repo?&lt;/strong&gt; That's right! You also win points for creating a repo using the open source projects and putting them on GitHub! Here are some examples of a &lt;a href="https://github.com/dataprofessor/ydata_profiling"&gt;Demo for quick EDA with ydata-profiling&lt;/a&gt; and some &lt;a href="https://github.com/archity/synthetic-data-gan"&gt;experiments with synthetic data with ydata-synthetic&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dazzle it up with an App or a Magic PR&lt;/strong&gt;: If you feel adventurous, both projects have plenty of issues up for grabs (&lt;a href="https://github.com/ydataai/ydata-profiling/issues"&gt;ydata-profiling issues&lt;/a&gt; | &lt;a href="https://github.com/ydataai/ydata-synthetic/issues"&gt;ydata-synthetic issues&lt;/a&gt;). If that feels a bit overwhelming, why not try to improve the docs? There's no such thing as "too many examples"!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can you get started?
&lt;/h2&gt;

&lt;p&gt;There are plenty of resources for inspiration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Check this video of how to &lt;a href="https://www.youtube.com/watch?v=fvXZcpTwbtA"&gt;install ydata-profiling&lt;/a&gt; and &lt;a href="https://github.com/ydataai/ydata-profiling/tree/develop/examples"&gt;some examples&lt;/a&gt; to give you some ideas!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=aESmGcxtBdU"&gt;Installing ydata-synthetic&lt;/a&gt; is also super easy. And you know what? You can also &lt;a href="https://www.youtube.com/watch?v=6Lzi26szKNo"&gt;use the Streamlit app&lt;/a&gt; if you're more into the UI experience. If you like hand-on coding, &lt;a href="https://github.com/ydataai/ydata-synthetic/tree/dev/examples"&gt;have a crack at these examples&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your sleigh got stuck somewhere? Join the Office Hours!
&lt;/h2&gt;

&lt;p&gt;Throughout your Open Source Advent, you can get office hours from the YData team directly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ask questions anytime&lt;/strong&gt; in the &lt;a href="https://tiny.ydata.ai/devto"&gt;Data-Centric AI Community Discord&lt;/a&gt; throughout the Advent!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Join the &lt;a href="https://discord.com/invite/ysPJtEZG"&gt;Open Source Advent on Discord&lt;/a&gt; and meet us on &lt;strong&gt;Dec 6 between 6-7PM EST&lt;/strong&gt; to get your questions answered live;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, knowledge is a gift that keeps on giving: may your data be clean, your analyses insightful, and your holiday season filled with the joy of data science! 🎁🎄&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>opensource</category>
      <category>pandas</category>
    </item>
    <item>
      <title>How to Do an EDA for Time-Series</title>
      <dc:creator>DCAI Community</dc:creator>
      <pubDate>Tue, 20 Dec 2022 19:14:20 +0000</pubDate>
      <link>https://dev.to/dcaicommunity/how-to-do-an-eda-for-time-series-43dn</link>
      <guid>https://dev.to/dcaicommunity/how-to-do-an-eda-for-time-series-43dn</guid>
      <description>Original post by Fabiana Clemente, Chief Data Officer at YData

&lt;p&gt;&lt;a href="" class="article-body-image-wrapper"&gt;&lt;img&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Exploring pandas-profiling for time-series exploratory analysis
&lt;/h2&gt;

&lt;p&gt;One of the early steps in the data science development cycle is to understand and explore the data for the problem you're solving.&lt;/p&gt;

&lt;p&gt;Exploratory Data Analysis (EDA) is a crucial step for a better data science workflow, and &lt;a href="https://github.com/ydataai/pandas-profiling" rel="noopener noreferrer"&gt;pandas-profiling&lt;/a&gt; has been our preferred choice to have in done quickly and with a single line of code, while providing the outputs to better understand the data and uncover meaningful insights.&lt;/p&gt;

&lt;p&gt;You have probably been using pandas-profiling for structured tabular data, which is commonly the first type of data that we learn to explore (&lt;em&gt;we all now the Iris dataset right?&lt;/em&gt; 😁) However, in real-world applications, there's another type of data structure that we can commonly find in our day to day: &lt;strong&gt;time-series data&lt;/strong&gt;! From traffic data to our daily trajectories or even our electricity and water consumption, all of them have one thing in common — &lt;strong&gt;temporal dependency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this blogpost, I'll be exploring some key steps in the analysis of a dataset, while leveraging the time-series features of pandas-profiling. The dataset explored refers to the &lt;a href="https://www.epa.gov/outdoor-air-quality-data" rel="noopener noreferrer"&gt;Air Quality in the USA&lt;/a&gt; and can be download from &lt;a href="https://www.epa.gov/outdoor-air-quality-data" rel="noopener noreferrer"&gt;EPA website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The full code and examples can be found in &lt;a href="https://github.com/ydataai/pandas-profiling/tree/master/examples/usaairquality" rel="noopener noreferrer"&gt;this GitHub repository&lt;/a&gt; so you can follow along the tutorial.&lt;/p&gt;




&lt;h2&gt;
  
  
  The nature of time-series data
&lt;/h2&gt;

&lt;p&gt;Time-series or sequential data has become one of the most valuable commodities in a world that is more and more data driven, which makes the need to perform EDA and mine time-series data a much needed skill for data science practitioners.&lt;/p&gt;

&lt;p&gt;Due to the nature of time series data, and when exploring the dataset, the type of analysis is different from when the dataset records are considered to be all independent. The complexity of the analysis grows with the addition of more than one entity within the same dataset.&lt;/p&gt;




&lt;h2&gt;
  
  
  Analyzing multiple entities in a time-series dataset
&lt;/h2&gt;

&lt;p&gt;The data description says it's the air quality data collected at outdoor monitors across the United States, Puerto Rico, and the U. S. Virgin Islands. With that information, we understand this is a multivariate time-series data that has several entities that we will need to take into consideration.&lt;/p&gt;

&lt;p&gt;Knowing this, I have some follow-up questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How many are the locations available in what concerns the pollutants measures? Do all the sensors collect the same amount data throughout the same timespan? How are the collected measures distributed in time and location?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some of theses questions can be easily answered with an heatmap comparing all the measurements and locations against time, as depicted by the code snippet and image below:&lt;/p&gt;

&lt;p&gt;Some of theses questions can be easily answered with an heatmap comparing all the measurements and locations against time, as depicted by the code snippet and image below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pandas_profiling.visualisation.plot&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;timeseries_heatmap&lt;/span&gt;

&lt;span class="nf"&gt;timeseries_heatmap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dataframe&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;entity_column&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Site Num&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sortby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Date Local&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe4f8nq0ivkqvsbiay2hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe4f8nq0ivkqvsbiay2hj.png" width="720" height="100"&gt;&lt;/a&gt;&lt;br&gt;USA Air Quality dataset heatmap
  &lt;/p&gt;




&lt;p&gt;The diagram above showcases the data points for each entity over time. We can see that not all stations have started collecting data at the same time, and based on the intensity of the heatmap, we can realize that some stations have more data points than others for a given time period. This means that, when modeling the time series, having dynamic timestamps for the training and test datasets might be better than having pre-determined timestamps. We also will have to further investigate the missing records and the scope for imputing records.&lt;/p&gt;

&lt;p&gt;With that basic understanding of what our entities time distribution looks like, we can start deep-diving into the data profiling for more insights. Since there are multiple time series, let’s have a look into each entity behavior.&lt;/p&gt;




&lt;h2&gt;
  
  
  A dive into time-series metrics
&lt;/h2&gt;

&lt;p&gt;If you were using pandas-profiling already, you probably know how to generate the profile report.&lt;/p&gt;

&lt;p&gt;The support for time series can be enabled by passing the parameter &lt;code&gt;tsmode=true&lt;/code&gt;, and the library will automatically identify the presence of features with autocorrelation (more on this later). For the analysis work properly, the dataframe needs to be sorted by entity columns and time, otherwise you can always leverage the &lt;code&gt;sortby&lt;/code&gt; parameter.&lt;/p&gt;

&lt;p&gt;The code for this is as simple as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pandas_profiling&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ProfileReport&lt;/span&gt;

&lt;span class="n"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ProfileReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filtered_time_series_data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tsmode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sortby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Date Local&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;profile_report.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s a preview of the output report using the time-series mode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pt78dht8950lkz40mq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pt78dht8950lkz40mq8.png" alt="Time-series report" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Seasonal and Non-stationary alerts
&lt;/h2&gt;

&lt;p&gt;Specific to time-series analysis, we can spot 2 new warnings — &lt;code&gt;NON_STATIONARY&lt;/code&gt; and &lt;code&gt;SEASONAL&lt;/code&gt;. The easiest way to have a quick grasp on your time-series is by having a look into the warnings section. For this particular use case, each profile report will depict the particular behavior of each USA location in what concerns pollutants measurements.&lt;/p&gt;

&lt;p&gt;Here’s how the warnings look in our report:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswpu1ojkkc555g328r5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswpu1ojkkc555g328r5f.png" alt="Warnings report" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A time series is said to be &lt;strong&gt;stationary&lt;/strong&gt; when its statistical properties (such as mean and variance) do not change over the time at which the series is observed. Conversely, a time series is &lt;strong&gt;non-stationary&lt;/strong&gt; when its statistical properties depend on time. For instance, time series with trends and seasonality (more on this later) is not stationary — these phenomena can affect the value of the time series at different times.&lt;/p&gt;

&lt;p&gt;Stationary processes are comparatively easier to analyze as there is a static relationship between the time and the variables. In fact, stationary has become a common assumption for most time-series analysis.&lt;/p&gt;

&lt;p&gt;While there are &lt;a href="https://people.stat.sc.edu/hitchcock/stat520ch5slides.pdf" rel="noopener noreferrer"&gt;models for non-stationary time series&lt;/a&gt;, most ML algorithms do expect a static relationship between the input features and the output. When the time-series is not stationary, a model's accuracy modeled from the data will vary at different points. This means the modeling choices are affected by the stationary/non-stationary nature of the time-series, and different data preparation steps should be applied when you want to &lt;a href="https://analyticsindiamag.com/how-to-make-a-time-series-stationary/" rel="noopener noreferrer"&gt;convert the time-series&lt;/a&gt; into a stationary one. &lt;/p&gt;

&lt;p&gt;So this alert will help you identify such columns and pre-process the time series accordingly.&lt;/p&gt;

&lt;p&gt;Seasonality in time series is a scenario in which the data experiences regular and predictable changes that recur over a defined cycle. This seasonality may obscure the signal that we wish to model when time-series modeling, and even worse, it may provide a strong signal to the models. This alert can help you identify such columns and alert you to fix the seasonality.&lt;/p&gt;

&lt;h2&gt;
  
  
  More information on the time-dependent features
&lt;/h2&gt;

&lt;p&gt;The first difference you will notice is that the line plot will replace the histogram for the column that was identified as time-dependent. Using the line plot, we can better understand the trajectory and the nature of the selected column. For this NO2 mean line plot, we see a downward trend in the trajectory, with continuous seasonal variations, with the maximum value recorded in the initial stages of the series.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuftqhdnmoqrkw6tbnrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuftqhdnmoqrkw6tbnrq.png" width="720" height="441"&gt;&lt;/a&gt;&lt;br&gt;Feature details of a column
  &lt;/p&gt;

&lt;p&gt;Next, when we toggle for more details of the column (as shown in the figure above), we’ll see a new tab with autocorrelation and partial-autocorrelation plots.&lt;/p&gt;

&lt;p&gt;For time series, autocorrelations show how the relationship of a time series at its present value relates to its previous values. Partial autocorrelation is the autocorrelation of a time series after removing the effect of previous time lags. Which means these plots are crucial to provide information regarding the autocorrelation degrees of the series under analysis, as well as the moving average degree.&lt;/p&gt;

&lt;p&gt;The above ACF and PACF plots are a bit ambiguous as expected. Looking throughout our warnings, we can see that &lt;strong&gt;NO2 mean&lt;/strong&gt; is a &lt;em&gt;non-stationary&lt;/em&gt; time variable, which removes the interpretability of these plots. Nevertheless, the ACF plot is useful to confirm us what we already suspected — &lt;strong&gt;NO2 mean&lt;/strong&gt; is &lt;em&gt;non-stationary&lt;/em&gt; — as the ACF plot values decrease very slowly instead of dropping quickly to zero as expected for the case of stationary series.&lt;/p&gt;

&lt;p&gt;The information gathered from the data profiling, the nature of time-series, and the alerts such as non-stationary and seasonality give you a head start in understanding the time-series data you have at your hand. This doesn’t mean you’re done with the exploratory data analysis — the goal is to use these insights as a starting point and work on further in-depth data analysis and further data preparation steps.&lt;/p&gt;

&lt;p&gt;From profiling the air quality dataset, we see several columns which are constant, which may not add much value when modeled. From the missing values chart, we see SO2 and CO2 air quality indexes have missing data — we should further explore the impact of this and the scope for imputation or dropping these columns altogether. Several columns were found with non-stationary and seasonality alerts, the next steps would be either to make them stationary or ensure the models we’ll be using can handle the non-stationary data points.&lt;/p&gt;

&lt;p&gt;You get the idea — as data scientists, it's important to use profiling tools to quickly grab an overall view of the data (in our case time series), and further inspect and take informed decisions on the data pre-processing and modeling stages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;The motto of pandas-profiling has always been the same: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Read the data? Pause. Generate the Pandas Profiling report, and inspect the data. Now start cleaning and re-iterate on exploring the data.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Though structured tabular data remains the most common data when giving the first steps data science, time-series data is widely used and core for the development of many business and advanced data-driven solutions. Due to the nature of the time series and how records depend on time and influence future occurrences — different kinds of insights are sought out by the data scientists during the exploratory data analysis phase.&lt;/p&gt;

&lt;p&gt;Thus, it was a matter of time before the Pandas Profiling library incorporated features to enable a time-series analysis mode to uncover these insights. From the changes required from the user to obtain the time-series-specific profiling report — to the output of new alerts that prompt concerns in the data, line plots and correlation graphs that are specific to time-series analysis — we demonstrated everything in this article.&lt;/p&gt;

&lt;p&gt;But the metrics and analysis explored today is only the beginning! More questions are to be answered. And for you, what is your usual approach while analysis time-series data? What do you miss the most when working with sequential datasets?&lt;/p&gt;




&lt;h3&gt;
  
  
  Made with ❤️ by the Data-Centric AI Community
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for reading! If you enjoyed this tutorial and plan to use pandas-profiling in your data quests, please ⭐️ our &lt;a href="https://github.com/ydataai/pandas-profiling" rel="noopener noreferrer"&gt;repository&lt;/a&gt; and join the discussion on our &lt;a href="https://discord.com/invite/mw7xjJ7b7s" rel="noopener noreferrer"&gt;Discord server&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>devops</category>
      <category>career</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to compare 2 datasets with pandas-profiling 🐼</title>
      <dc:creator>DCAI Community</dc:creator>
      <pubDate>Tue, 20 Dec 2022 16:54:52 +0000</pubDate>
      <link>https://dev.to/dcaicommunity/how-to-compare-2-datasets-with-pandas-profiling-469p</link>
      <guid>https://dev.to/dcaicommunity/how-to-compare-2-datasets-with-pandas-profiling-469p</guid>
      <description>&lt;h2&gt;
  
  
  Visualization is the cornerstone of Exploratory Data Analysis
&lt;/h2&gt;

&lt;p&gt;When facing a new, unknown dataset, visual inspection allows us to get a feel of the available information, draw some patterns regarding the data, and diagnose several issues that we might need to address. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ydataai/pandas-profiling"&gt;pandas-profiling&lt;/a&gt; has been the indispensable swiss-knife in every data scientist’s tool belt. However, something that seemed to be missing was the ability to &lt;strong&gt;compare different reports side-by-side&lt;/strong&gt;, which would help us continuously assess the transformations performed during EDA!&lt;/p&gt;




&lt;h2&gt;
  
  
  Side-by-side comparison: the wait is over!
&lt;/h2&gt;

&lt;p&gt;pandas-profiling now supports a "side-by-side" comparison feature that lets us automate the comparison process with a single line of code. &lt;/p&gt;

&lt;p&gt;In this blogpost, I'll put you up to speed with this new functionality and show you how we can use it to produce faster and smarter transformations on our data. &lt;/p&gt;

&lt;p&gt;I’ll be using the &lt;a href="https://www.kaggle.com/datasets/mrsantos/hcc-dataset"&gt;HCC Dataset&lt;/a&gt;, which I have personally collected during my MSc. For this particular use case, I’ve artificially introduced some additional data quality issues to show you how visualisation can help us detect them and guide us towards their efficient mitigation.&lt;/p&gt;

&lt;p&gt;The full code and examples can be found on &lt;a href="https://github.com/ydataai/pandas-profiling/tree/master/examples/hcc"&gt;this GitHub repository&lt;/a&gt; so you can follow along the tutorial.&lt;/p&gt;




&lt;h2&gt;
  
  
  pandas-profiling: EDA at your fingertips
&lt;/h2&gt;

&lt;p&gt;We’ll start by profiling the HCC dataset and investigating the data quality issues suggested in the report:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;profiling&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pandas_profiling&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ProfileReport&lt;/span&gt;

&lt;span class="c1"&gt;# Read the HCC Dataset
&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hcc.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Produce the data profiling report
&lt;/span&gt;&lt;span class="n"&gt;original_report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ProfileReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Original Data&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;original_report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;original_report.html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ksQyljtI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/916u0lqo2f11ftkhvgpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ksQyljtI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/916u0lqo2f11ftkhvgpr.png" width="800" height="357"&gt;&lt;/a&gt;&lt;br&gt;Alerts shown in Pandas Profiling Report.
  &lt;/p&gt;

&lt;p&gt;According to the "Alerts" overview, there are four main types of potential issues that need to be addressed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates&lt;/strong&gt;: 4 duplicate rows in data;&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Constant&lt;/strong&gt;: Constant value “999” in 'O2';&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Correlation&lt;/strong&gt;: Several features marked as highly correlated; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing&lt;/strong&gt;: Missing Values in ‘Ferritin’&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The validity of each potential problem (as well as the need to find a mitigation strategy for it) depends on the specific use case and domain knowledge. In our case, with the exception of the "high correlation" alerts, which would require further investigation, the remaining alerts seem to reflect true data quality issues and can be tackled using a few practical solutions. Let's see how!&lt;/p&gt;

&lt;h3&gt;
  
  
  Removing Duplicate Rows
&lt;/h3&gt;

&lt;p&gt;Depending on the nature of the domain, there might be records that have the same values without it being an error. However, considering that some of the features in this dataset are quite specific and refer to an individual’s biological measurements (e.g., "Hemoglobin", "MCV",  "Albumin"), it’s unlikely that several patients report the same exact values for all features. Let’s  start by dropping these duplicates from the data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Drop duplicate rows
&lt;/span&gt;&lt;span class="n"&gt;df_transformed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;df_transformed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df_transformed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop_duplicates&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Removing Irrelevant Features
&lt;/h3&gt;

&lt;p&gt;The constant values in O2 also reflect a true inconsistency in data. There may be two main reasons for such an error to arise: either the O2 values were measured and stored automatically in the database and the pulse oximeter failed, or the person taking this measurement kept evaluating repeated erroneous messages and simply coded them as “999”, which is an absurd value (O2 values range from 0% to 100%). In all cases, these values are erroneous and should therefore be removed from the analysis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Remove O2
&lt;/span&gt;&lt;span class="n"&gt;df_transformed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df_transformed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;columns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;O2&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Missing Data Imputation
&lt;/h3&gt;

&lt;p&gt;As frequently happens with medical data, HCC dataset also seems extremely susceptible to missing data. A simple way to address this issue (avoiding removing incomplete records or entire features) is data imputation. We’ll use mean imputation to fill in the absent observations, as it is the most common and simple of statistical imputation techniques and often serves as a baseline method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Impute Missing Values
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.impute&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SimpleImputer&lt;/span&gt;
&lt;span class="n"&gt;mean_imputer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SimpleImputer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;strategy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mean&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;df_transformed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Ferritin&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mean_imputer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit_transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df_transformed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Ferritin&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Side-by-side comparison: faster and smarter iterations on your data
&lt;/h2&gt;

&lt;p&gt;Now for the fun part! After implementing the first batch of transformations to our dataset, we're ready to assess their impact on the overall quality of our data. &lt;/p&gt;

&lt;p&gt;This is where the pandas-profiling report functionality comes in handy: the comparison between the original versus the transformed data can now be automatically performed through the &lt;code&gt;.compare&lt;/code&gt; method of the &lt;code&gt;ProfileReport&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;transformed_report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ProfileReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df_transformed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Transformed Data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;comparison_report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;original_report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;transformed_report&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;comparison_report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;original_vs_transformed.html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;How did these transformations impacted the quality of our data? And What would we find by further investigating each of the transformations performed? Let’s dive deeper into the comparison results!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Dataset Overview
&lt;/h3&gt;

&lt;p&gt;The comparison report shows both datasets ("Original Data" and "Transformed Data") and distinguishes their properties by respectively using a blue or red colour in titles and graph plots. &lt;/p&gt;

&lt;p&gt;As shown in the report, the transformed dataset contains one less categorical feature ("O2" was removed), 165 observations (versus the original 171 containing duplicates) and no missing values (in contrast with the 79 missing observations in the original dataset).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wyNTIU5J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i31tenvtd65p3blkbd5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wyNTIU5J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i31tenvtd65p3blkbd5i.png" width="800" height="314"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Dataset Statistics.
  &lt;/p&gt;

&lt;h3&gt;
  
  
  Duplicate Records
&lt;/h3&gt;

&lt;p&gt;Conversely to the original data, there are no duplicate patient records in the transformed data: our complete and accurate case base can move onward to the modeling pipeline, avoiding data overfitting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AsxnI59v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jrjnsrlnsqjvlicyirya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AsxnI59v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jrjnsrlnsqjvlicyirya.png" width="800" height="232"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Duplicate Rows.
  &lt;/p&gt;

&lt;h3&gt;
  
  
  Irrelevant Features
&lt;/h3&gt;

&lt;p&gt;Features that have not been subjected to any transformation remain the same (as shown below for "Encephalopathy"): &lt;em&gt;original&lt;/em&gt; and &lt;em&gt;transformed&lt;/em&gt; data summary statistics do not change. In turn, removed features are only presented for the original data (shown in blue), as is the case of "O2".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s8cobn----/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxxmyjf0j3sxstz1ty8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s8cobn----/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxxmyjf0j3sxstz1ty8f.png" width="800" height="328"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Encephalopathy remains the same.
  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cp-9ucMt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ri7t6pub32cxyakz5bh4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cp-9ucMt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ri7t6pub32cxyakz5bh4.png" width="800" height="258"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: O2 is only shown for the original data.
  &lt;/p&gt;

&lt;h3&gt;
  
  
  Missing Values
&lt;/h3&gt;

&lt;p&gt;Contrarily to the original data, there are no missing observations after the data imputation was performed. Note how both the nullity count and matrix show the differences between both versions of the data: in the transformed data, "Ferritin" has now 165 complete values and no blanks can be found in the nullity matrix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mv49fNzD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6n2vbw3clp4r27b5c62s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mv49fNzD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6n2vbw3clp4r27b5c62s.png" width="800" height="340"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Missing Values.
  &lt;/p&gt;

&lt;h3&gt;
  
  
  A deeper investigation on data properties
&lt;/h3&gt;

&lt;p&gt;If we were to compare all features prior and before the data transformations performed, we would find an insightful detail in what concerns missing data imputation. &lt;/p&gt;

&lt;p&gt;When analysing the "Ferritin" values in higher detail, we’d see how imputing values with the mean has distorted the original data distribution, which is undesirable:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UOVVg2NO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c24g2zbn4dr72dpv2ra6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UOVVg2NO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c24g2zbn4dr72dpv2ra6.png" width="800" height="371"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Ferritin - imputed values seem to distort the original feature distribution.
  &lt;/p&gt;

&lt;p&gt;This artefact is also observed through the visualisation of interactions and correlations, where daft interaction patterns and higher correlation values emerge in the relationship between "Ferritin" and the remaining features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oNZtRYuc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bv9dq34aok7x207n9kos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oNZtRYuc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bv9dq34aok7x207n9kos.png" width="800" height="470"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Interactions between Ferritin and Age: imputed values are shown in a vertical line corresponding to the mean.
  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EOYFFD5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nghlzgw3gsu57ug6uiid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EOYFFD5s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nghlzgw3gsu57ug6uiid.png" width="800" height="397"&gt;&lt;/a&gt;&lt;br&gt;Comparison Report: Correlations - Ferritin correlation values seem to increase after data imputation.
  &lt;/p&gt;

&lt;p&gt;This comes to show that the comparison report is not only useful to highlight the differences introduced after data transformations, but it provides several visual cues that lead us towards important insights regarding those transformations: in this case, a more specialised data imputation strategy should be considered. &lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Throughout this small use case, I've covered the usefulness of comparing two sets of data within the same profiling report to highlight the data transformations performed during EDA and evaluate their impact on data quality. Nevertheless, the applications of this functionality are endless, as the need to (re)iterate on feature assessment and visual inspection is vital for data-centric solutions!&lt;/p&gt;




&lt;h3&gt;
  
  
  Made with ❤️ by the Data-Centric AI Community
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Thank you for reading! If you enjoyed this tutorial and plan to use pandas-profiling in your data quests, please ⭐️ our &lt;a href="https://github.com/ydataai/pandas-profiling"&gt;repository&lt;/a&gt; and join the discussion on our &lt;a href="https://discord.com/invite/mw7xjJ7b7s"&gt;Discord server&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>datascience</category>
      <category>jupyter</category>
    </item>
    <item>
      <title>The Data-Centric AI Community is on Discord 👾</title>
      <dc:creator>DCAI Community</dc:creator>
      <pubDate>Tue, 20 Dec 2022 11:58:31 +0000</pubDate>
      <link>https://dev.to/dcaicommunity/the-data-centric-ai-community-is-on-discord-1l42</link>
      <guid>https://dev.to/dcaicommunity/the-data-centric-ai-community-is-on-discord-1l42</guid>
      <description>&lt;h2&gt;
  
  
  Welcome to our humble home!
&lt;/h2&gt;

&lt;p&gt;This Christmas, you won’t be "home alone"! The &lt;strong&gt;Data-Centric AI Community&lt;/strong&gt; is officially moving to a fun little place of the web — &lt;a href="https://discord.com/invite/mw7xjJ7b7s" rel="noopener noreferrer"&gt;our brand new Discord server&lt;/a&gt; — and you’re invited to join us during the holidays.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gpu07pzn4smiiklcgry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gpu07pzn4smiiklcgry.png" alt="The DCAI Community is the place of all things data&amp;lt;br&amp;gt;
" width="800" height="980"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What to expect from the server?
&lt;/h3&gt;

&lt;p&gt;The DCAI Community is the &lt;em&gt;home of all things data&lt;/em&gt; and is therefore designed with that in mind. &lt;/p&gt;

&lt;p&gt;There are essentially 5 categories you may explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Let's Get Started:&lt;/strong&gt; to get you started in the community, introduce yourself and invite friends;&lt;/li&gt;
&lt;li&gt;💭 &lt;strong&gt;Data-Centric Topics:&lt;/strong&gt; exclusively dedicated to data-centric discussions;&lt;/li&gt;
&lt;li&gt;⭐️ &lt;strong&gt;Community Hub:&lt;/strong&gt; to share ideas and personal projects, find inspiration and job opportunities, and foster partnerships;&lt;/li&gt;
&lt;li&gt;🐼 &lt;strong&gt;Pandas Profiling&lt;/strong&gt; and 🔐 &lt;strong&gt;YData Synthetic:&lt;/strong&gt; dedicated to our open-source users and contributors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq9o6nwf3jmqi9h43801.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq9o6nwf3jmqi9h43801.png" alt="DCAI server includes a dedicated space for data-centric discussion" width="800" height="820"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Everything has its own place
&lt;/h3&gt;

&lt;p&gt;Async communication is already hard, and more so when you have to skim through piles of vendor and promotional content to get truly helpful information and meaningful conversations. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We want our space to be exclusively dedicated the boost genuine interests: that’s what a community is for.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DCAI has a special "#promote" channel, but that’s it. If you are truly invested on having people to provide feedback and collaborate you can post your work in the discussion forums or look for partners and colleagues in "#partnerships".&lt;/p&gt;

&lt;p&gt;Alternatively, if you found DCAI through &lt;a href="https://github.com/ydataai/pandas-profiling" rel="noopener noreferrer"&gt;pandas-profiling&lt;/a&gt; or &lt;a href="https://github.com/ydataai/ydata-synthetic" rel="noopener noreferrer"&gt;ydata-synthetic&lt;/a&gt; you can find support for your troubleshooting and provide feedback on interesting features!&lt;/p&gt;

&lt;p&gt;So there you have it, everything has its own place, even &lt;em&gt;events&lt;/em&gt;! No need to have links scattered through "random" or "general" channels. Just add your event to the community! It will automatically synchronise with your time zone, so that everyone is always up-to-date. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2299i1mzfncwb1azitv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2299i1mzfncwb1azitv1.png" alt="Events can be created by anyone on the server to that everyone is always up to date" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Find your tribe and engage in genuine conversations
&lt;/h3&gt;

&lt;p&gt;Similarly to machine learning algorithms, each of us can belong to one or several tribes, and a community is a place where we can connect with like-minded fellas.&lt;/p&gt;

&lt;p&gt;When entering the DCAI Community, you can join yours by simply reacting to their respective emojis: a moderator will then assign you to the desired role. &lt;/p&gt;

&lt;p&gt;Then, while navigating the community, you can get in touch with your tribe when asking a particular question or sharing an update. Just be careful not to abuse this permission (e.g., using it for promotional content) or it may be revoked!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zqy7wr9ts9rztz0tfzp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zqy7wr9ts9rztz0tfzp.png" alt="Server roles are like tribes: you can find expert help and share updates with yours" width="800" height="737"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to join
&lt;/h3&gt;

&lt;p&gt;Joining the community is easy-peasy: &lt;a href="https://discord.com/invite/mw7xjJ7b7s" rel="noopener noreferrer"&gt;just click this link&lt;/a&gt;. If you are already a Discord user, the link should take you directly to our server. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you run into any troubles with “Invalid Invite”&lt;/strong&gt;, try opening the link in a private browser window, or simply add the server manually and paste the invite link: &lt;code&gt;https://discord.gg/mw7xjJ7b7s&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8maoldi433q5dt0rrfz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq8maoldi433q5dt0rrfz.png" alt="You can add a server in your discord app by clicking the “+” button in the left tab" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don’t have a Discord account yet, you’ll need to create one, and then join the server using the invite link: &lt;code&gt;https://discord.gg/mw7xjJ7b7s&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnypdfbo9tdtpe40r40x8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnypdfbo9tdtpe40r40x8.png" alt="You can also join DCAI when creating your Discord account" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  See you soon!
&lt;/h3&gt;

&lt;p&gt;This marks a new beginning for the Data-Centric AI Community!&lt;/p&gt;

&lt;p&gt;We're preparing a year full of exciting initiatives, where each month will be dedicated to a particular data quality issue — what it is, where we can encounter it "in the wild", how it affects data science applications, and of course... how it may be diagnosed and mitigated!&lt;/p&gt;

&lt;p&gt;So if you haven't yet, stay tuned to &lt;a href="https://datacentricai.community/#newsletter" rel="noopener noreferrer"&gt;our newsletter&lt;/a&gt;: we promise to spill all &lt;em&gt;The Gaussip&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;We hope you can join us and share your journey!👾&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
