<?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 Stella Kwon on Medium]]></title>
        <description><![CDATA[Stories by Stella Kwon on Medium]]></description>
        <link>https://medium.com/@kwonyounjoo31?source=rss-cb21f9f79f37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U_uUgFolI1St89Qrdzq2UQ.jpeg</url>
            <title>Stories by Stella Kwon on Medium</title>
            <link>https://medium.com/@kwonyounjoo31?source=rss-cb21f9f79f37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 14:19:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kwonyounjoo31/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[Understanding Linear Regression: Training Data, Predictions, and R² Score]]></title>
            <link>https://medium.com/@kwonyounjoo31/understanding-linear-regression-training-data-predictions-and-r%C2%B2-score-07455752382f?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/07455752382f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[scikit-learn]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 11:45:17 GMT</pubDate>
            <atom:updated>2026-11-05T11:45:17.209Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Today’s Learning Keywords</h3><ul><li>Linear Regression</li><li>Training Data and Test Data</li><li>Model Prediction</li><li>Actual Values and Predicted Values</li><li>R² Score (Coefficient of Determination)</li><li>Regression Coefficient and Intercept</li></ul><h3>2. What I Learned Today</h3><p>Today, I worked with Linear Regression using Scikit-learn. My goal was to build a model that could estimate process_temp based on air_temp. I had already learned how to create a regression model, but I wanted to understand how to evaluate its performance using the R² score.</p><p>I started by dividing the dataset into training and test sets using train_test_split(). I set test_size=0.2, which means that 80% of the data would be used for training and the remaining 20% for testing. I also used random_state=42 to ensure that the data was split consistently whenever I ran the code.</p><pre>from sklearn.model_selection import train_test_split<br>from sklearn.linear_model import LinearRegression<br><br>X_train, X_test, y_train, y_test = train_test_split(<br>    df[[&#39;air_temp&#39;]],<br>    df[[&#39;process_temp&#39;]],<br>    test_size=0.2,<br>    random_state=42<br>)<br>model = LinearRegression()<br>model.fit(X_train, y_train)</pre><p>The fit() method trains the model by learning the relationship between the input variable (air_temp) and the target variable (process_temp). Once the model was trained, I wanted to calculate the R² score to see how well it could explain the relationship between these two variables.</p><p>However, I encountered an error when I tried to calculate the score.</p><h3>3. Problems and Errors</h3><p>My initial code looked like this:</p><pre>from sklearn.metrics import r2_score<br><br>r2 = r2_score(y_true, y_pred)<br>print(&quot;R² Score:&quot;, r2)</pre><p>The notebook returned a NameError because y_true had not been defined.</p><p>At first, I was confused about what y_true actually represented. I understood that it referred to the actual values, while y_pred represented the model&#39;s predictions. However, I was unsure whether the actual values should come from y_train or y_test.</p><p>I initially assumed that y_train could be used as the actual values and tried the following:</p><pre>y_true = y_train<br>r2 = r2_score(y_true, y_pred)</pre><p>This time, I received a ValueError indicating that the two inputs had different numbers of samples: [8000, 1].</p><p>I then went back to examine how I had generated y_pred.</p><pre>y_pred = model.predict(<br>    pd.DataFrame([[305]], columns=[&#39;air_temp&#39;])<br>)</pre><p>This was where I found the actual problem. I had generated a prediction using only one input value, where air_temp was 305. Therefore, y_pred contained only one predicted value, whereas y_train contained 8,000 actual observations.</p><p>The two datasets were not comparable because they represented different sets of observations.</p><p>More importantly, I realized that I had been confusing the purpose of training data and test data. Although y_train also contains actual observed values, it is used to train the model. To evaluate how well the model performs on data it has not previously learned from, I needed to compare the actual values in y_test with predictions generated from X_test.</p><h3>4. How I Solved the Problem</h3><p>I changed the prediction step so that the model would generate predictions using the test dataset rather than a single temperature value.</p><pre># Predict using test data<br>y_pred = model.predict(X_test)<br><br># Calculate R² Score<br>from sklearn.metrics import r2_score<br>r2 = r2_score(y_test, y_pred)<br>print(&quot;R² Score:&quot;, r2)</pre><p>This time, both y_test and y_pred contained 2,000 corresponding observations, so the R² score could be calculated successfully.</p><p>After evaluating the model, I also checked the regression coefficient and intercept to understand the equation learned by the model.</p><pre>print(&quot;Regression Coefficient (W):&quot;, model.coef_)<br>print(&quot;Intercept (b):&quot;, model.intercept_)</pre><p>The general form of a simple linear regression equation is:</p><p><strong>process_temp = W × air_temp + b</strong></p><p>Here, W represents the regression coefficient, which indicates how much the predicted process_temp changes when air_temp increases by one unit. The intercept (b) represents the predicted value when the input variable is zero.</p><p>Finally, I used the trained model to predict process_temp under a specific condition where air_temp was 305 K.</p><pre>new_pred = model.predict(<br>    pd.DataFrame([[305]], columns=[&#39;air_temp&#39;])<br>)<br><br>print(new_pred)</pre><p>This allowed me to use the same trained model for a separate prediction without confusing it with the predictions used for model evaluation.</p><h3>5. Final Reflection</h3><p>This exercise helped me understand that training a model and evaluating a model are two different processes. Before working on this problem, I knew that actual values and predicted values were necessary to calculate the R² score, but I had not fully understood which datasets should be compared.</p><p>I also learned that y_train is not a set of predicted or trained values. It contains the actual target values used during model training. On the other hand, y_test contains actual observations that the model has not used during training. Comparing y_test with predictions generated from X_test allows me to examine how well the model performs on unseen data.</p><p>One thing I want to pay more attention to in future exercises is the relationship between input data, target data, and prediction results. An error is not always caused by incorrect syntax. Sometimes, the code runs into problems because the data being compared does not represent the same observations.</p><p>I want to become more comfortable with the overall machine learning process, rather than simply memorizing the functions provided by Scikit-learn. Understanding why each dataset is used and what each evaluation metric tells me will be important as I move on to more complex models.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07455752382f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Python’s Modulo and Sorting Methods Through Problem Solving]]></title>
            <link>https://medium.com/@kwonyounjoo31/understanding-pythons-modulo-and-sorting-methods-through-problem-solving-4f41e8d755dd?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f41e8d755dd</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[problem-solving]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 02:19:42 GMT</pubDate>
            <atom:updated>2026-11-03T02:19:42.702Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Today’s Learning Keywords</h3><ul><li>Modulo operator (%)</li><li>Floor division (//)</li><li>List sorting (sort() and sorted())</li><li>Return values</li><li>Conditional statements</li></ul><h3>2. What I Learned Today</h3><p>Today’s coding exercise was about writing a function called solution that takes an array of integers and a divisor. The goal was to return a new array containing only the elements that can be divided by the divisor without a remainder, arranged in ascending order. If no elements meet this condition, the function should return an array containing -1.</p><p>At first, I thought the problem was relatively straightforward. I needed to iterate through the array, identify the numbers divisible by the given divisor, and store them in a new list. However, my initial attempt revealed that I had misunderstood some basic Python operators.</p><p>My first approach was to use the floor division operator (//) to check whether an element was divisible by the divisor.</p><pre>def solution(arr, divisor):<br>    new_list = []<br><br>    for i in arr:<br>        if i // divisor == 0:<br>            new_list.append(i)<br>    if len(new_list) == 0:<br>        new_list.append(-1)<br>    answer = new_list.sort()<br>    return answer</pre><p>This code did not produce the expected result. The main issue was the condition i // divisor == 0. I had assumed that checking the division result would tell me whether a number was divisible by another number. However, // calculates the quotient rather than checking whether the remainder is zero.</p><p>This led me to examine the difference between the floor division operator (//) and the modulo operator (%).</p><p>In Python, // returns the quotient after floor division, whereas % returns the remainder. For example, 17 // 5 returns3, while 17 % 5 returns 2. Since I needed to identify numbers that could be divided evenly, the modulo operator was the appropriate choice. When the remainder is zero, the number is divisible by the given divisor.</p><p>I revised the condition as follows:</p><pre>if i % divisor == 0:<br>    new_list.append(i)</pre><p>This corrected the divisibility check, but another issue appeared when I ran the code. The output was None (displayed as null in the coding platform), even though the filtering process was working correctly.</p><p>The problem was in the sorting operation:</p><pre>answer = new_list.sort()<br>return answer</pre><p>I had assumed that sort() would return the sorted list. However, Python&#39;s sort() method modifies the original list directly and returns None. As a result, assigning its return value to answer meant that the variable contained None rather than the sorted elements.</p><p>I learned that Python provides two ways to sort a list, and they behave differently. The sort() method changes the original list in place, while the sorted() function creates and returns a new sorted list. Understanding this distinction helped me recognize why my code was producing an unexpected result.</p><h3>3. Final Code and Results</h3><p>After identifying both problems, I modified the code by using the modulo operator for the divisibility check and calling sort() separately before returning the list.</p><pre>def solution(arr, divisor):<br>    new_list = []<br>    <br>    for i in arr:<br>        if i % divisor == 0:<br>            new_list.append(i)<br>    if len(new_list) == 0:<br>        new_list.append(-1)<br>    new_list.sort()<br>    return new_list</pre><p>For the test case below:</p><ul><li>Input: arr = [5, 9, 7, 10], divisor = 5</li><li>Expected output: [5, 10]</li><li>Actual result: Passed</li></ul><p>The function successfully returned [5, 10], confirming that the filtering and sorting operations were working as intended.</p><h3>4. What I Would Do Differently Next Time</h3><p>This exercise reminded me that understanding what an operator or method actually returns is just as important as knowing how to use it. My initial code was not entirely wrong in its overall structure. I had correctly approached the problem by creating a new list, iterating through the elements, and handling the case where no matching values were found. However, I had overlooked the specific behavior of the operators and methods I chose.</p><p>If I encounter a similar problem again, I will first identify the exact condition required by the question before selecting an operator. I will also pay closer attention to whether a method modifies an existing object or returns a new value.</p><p>Although these mistakes were relatively small, resolving them helped me understand Python’s behavior more clearly. Rather than simply changing the code until it passes, I want to become more familiar with why a particular expression produces a certain result. I believe this habit will be important as I work on more complex programming problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f41e8d755dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning to Ask Better Questions Through Data Analysis]]></title>
            <link>https://medium.com/@kwonyounjoo31/learning-to-ask-better-questions-through-data-analysis-608b8f5e50bf?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/608b8f5e50bf</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[beauty-industry]]></category>
            <category><![CDATA[skincare]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 11:51:54 GMT</pubDate>
            <atom:updated>2026-10-21T11:51:54.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>From a vague question to an actual analysis</h3><p>For my first basic project, my team and I analyzed Sephora skincare product data, focusing on moisturizers, their ingredients, and customer ratings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*nFbkSGo-zRbiXY90W8qyLQ.png" /><figcaption>Original Dataset</figcaption></figure><p>Our goal was to explore whether the ingredients found in highly rated moisturizers differed from those in lower-rated products, and whether those patterns varied across five skin types: combination, dry, normal, oily, and sensitive.</p><p>At first, this sounded like a straightforward data analysis task. We had the data, we knew what we wanted to look at, and we could use Python to process and visualize the results.</p><p>But I soon realized that knowing what data to look at and knowing what to find out from it are two very different things.</p><p>In previous projects, someone else had usually set the research questions or hypotheses. This time, my teammates and I had to decide everything ourselves, from defining the problem to choosing our analysis methods and interpreting the results.</p><p>We started with questions like,</p><blockquote>“Which ingredients appear most often in products for each skin type?” and “How do ingredients differ between highly rated and lower-rated moisturizers?”</blockquote><p>These were reasonable questions, but they didn’t fully capture what we wanted to know. We had to go back and clarify our main goal: to explore the relationship between ingredients and product ratings among moisturizers labeled for different skin types.</p><p>That sounds like a small difference, but it changed how we approached the analysis. We needed to do more than count ingredients. We had to think about which products to compare, how to make the comparison fair, and what conclusions the data could actually support.</p><h3>Cleaning data wasn’t as simple as I expected</h3><p>One of the biggest challenges was deciding how to handle the data before analyzing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0PXBtmUHg7Yhu_rDQ2hlw.png" /><figcaption>moisturizer_df = df[df[‘Label’]== ‘Moisturizer’]</figcaption></figure><p>Here is part of the code I used for this analysis.</p><pre># Find products with zero suitability values across all five skin types<br>(moisturizer_df[skin_cols].sum(axis=1) == 0).sum()<br><br># Count ingredients that do not contain a comma<br><br>(~moisturizer_df[&#39;Ingredients&#39;].str.contains(&#39;,&#39;, na=False)).sum()<br><br># Print all ingredients that do not contain a comma<br><br>for ingredients in moisturizer_df[<br>    ~moisturizer_df[&#39;Ingredients&#39;].str.contains(&#39;,&#39;, na=False)<br>][&#39;Ingredients&#39;]:<br>    print(ingredients)<br><br># Count products with missing ingredient information by skin type<br>## Specifically, count skin type entries containing &#39;Visit&#39;, &#39;No Info&#39;, or &#39;#NAME?&#39;<br><br>moisturizer_df[<br>    moisturizer_df[&#39;Ingredients&#39;].str.contains(&#39;Visit&#39;, na=False)|moisturizer_df[&#39;Ingredients&#39;].str.contains(&#39;No Info&#39;, na=False)|moisturizer_df[&#39;Ingredients&#39;].str.contains(&#39;#NAME?&#39;, na=False,regex=False)<br>][skin_cols].sum()<br><br># Initialize clean_df as a single DataFrame for use throughout preprocessing and analysis.<br>clean_df = moisturizer_df[~invalid_mask].copy()<br><br># Validate the DataFrame after removing 32 products with missing ingredient information<br>## 266 products remaining out of the original 298<br>clean_df.shape<br><br># Remove products with ambiguous ingredient information at indices 90, 93, 121, and 261<br># 262 products remaining out of the original 298<br><br>clean_df = clean_df[~clean_df.index.isin([90, 93, 121, 261])].copy()<br>clean_df.shape</pre><p>We started with 1,472 skincare products and narrowed the dataset down to 262 moisturizers after preprocessing. The dataset included product ratings, ingredient lists, and labels indicating which skin types each product was intended for.</p><p>Some products had a rating of zero, while others had zeros across all five skin types. We weren’t sure whether these zeros meant “not suitable” or simply “no information available.”</p><p>Rather than guess, we handled the two cases separately. We excluded products with a rating of zero from the rating comparison, but kept them for other analyses. Products with no skin type labels also stayed in the dataset, just not in the skin-type-specific analysis.</p><p>This way, we could still use the ingredient and rating data without making assumptions about what the zeros meant.</p><p>It took more thought than I expected. Cleaning data wasn’t just about fixing messy values. We had to decide what each value could actually tell us — and what it couldn’t. <strong>Not every blank needs to be filled, and not every zero needs to be changed.</strong> Sometimes, it’s better to leave the data as it is and be clear about its limits.</p><h3>Why counting ingredients wasn’t enough</h3><p>Another challenge came when we started comparing ingredients.</p><p>Some ingredients appeared in many products, while others appeared only a few times. If we simply counted how often an ingredient appeared, products in larger groups could dominate the results.</p><p>So instead of comparing raw counts alone, we looked at the percentage of products in each group that contained a given ingredient.</p><p>For example, we compared the proportion of highly rated products containing an ingredient with the proportion of lower-rated products containing the same ingredient. This gave us a more useful way to see how ingredient patterns differed between the two groups.</p><p>We also needed to decide which ingredients were worth comparing. Ingredients that appeared in only one or two products could look unusually important just because the sample was so small. We therefore considered both the percentage and the actual number of products containing each ingredient.</p><p>These decisions might seem like small technical details, but they shaped the results we presented.</p><p>I learned that analysis isn’t simply a matter of running code and reading the output. Before trusting a result, you need to understand how it was calculated and whether the comparison makes sense.</p><h3>Not every common ingredient tells us something new</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rz30LJrcO8wT09hGX7KOiw.png" /><figcaption>Top 5 Ingredients by Skin Type in High-Rated Moisturizers</figcaption></figure><p>One of our findings was that ingredients such as Water and Glycerin appeared frequently in both highly rated and lower-rated moisturizers.</p><p>Their frequent appearance in highly rated products alone didn’t tell us much about what made those products different. These ingredients were common across both groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*t6AopS6Rk7q9hINo05NpSg.png" /><figcaption>Common High-Frequency Ingredients: High vs. Low Rated Products 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*TAUVu1MJ2tHV-RegDngTIg.png" /><figcaption>Common High-Frequency Ingredients: High vs. Low Rated Products 2</figcaption></figure><p>We therefore looked for ingredients that appeared relatively more often in highly rated products, rather than treating every frequently occurring ingredient as a promising candidate.</p><p>Carbomer, Squalane, and 1,2-Hexanediol were among the ingredients that stood out in our comparisons.</p><p>We then explored which ingredients appeared more frequently in highly rated products for each skin type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*rhbCPyy46f9eUYc4vTqKFQ.png" /><figcaption>Top 5 Ingredients by Skin Type: High vs Low</figcaption></figure><p>However, we had to be careful about how we described these findings. Our analysis showed patterns in product ingredients and customer ratings. It did not prove that a particular ingredient caused a higher rating or improved someone’s skin.</p><p>Ratings can be affected by many things, including price, brand, product texture, and individual experience. We also didn’t have ingredient concentration data or actual measurements of skin improvement.</p><p>For that reason, we treated our results as ingredient candidates worth exploring further, rather than definitive recommendations for specific skin types.</p><p>This was an important distinction for me. Finding a pattern in data is one thing; explaining why that pattern exists is another.</p><h3>Working as a team helped us see what we had missed</h3><p>Throughout the project, we shared our progress regularly and checked in with one another when we ran into problems.</p><p>These conversations were especially useful when we had to make decisions about the analysis. Sometimes, a question from a teammate made me realize that I hadn’t fully understood why we were doing something in the first place.</p><p>We also used Notion to manage tasks and track progress. Breaking the work into smaller tasks made it easier to see what had been completed, what still needed attention, and where someone might need help.</p><p>Looking back, I think our regular check-ins were one of the things we did well. They gave us opportunities to catch problems, share ideas, and adjust our plans instead of letting everyone work separately until the end.</p><p>At the same time, I wish we had defined our final output more clearly at the beginning.</p><p>Because our research questions weren’t specific enough at first, we spent time revisiting the analysis direction. We also made some decisions about rating groups and ingredient selection criteria under time pressure. It would have been better to research and justify those criteria before settling on them.</p><p>I learned that having a schedule is useful, but a schedule alone doesn’t guarantee that a project is moving in the right direction. We also need to check whether the work we’re doing still answers the question we started with.</p><h3>What I want to do differently next time</h3><p>If I could start this project again, there are three things I would change.</p><p><strong>First, I would define the final output before getting too far into the analysis.</strong></p><p>I want to be able to explain what we’re trying to produce, what questions we need to answer, and how each analysis step contributes to that result. This would help us avoid spending time on interesting questions that don’t directly support our main goal.</p><p><strong>Second, I would keep better records of the analysis process.</strong></p><p>I was responsible for managing schedules and deliverables, preprocessing ingredient data, and creating the presentation slides. Although we tracked tasks, I felt that my notes on the analysis process itself could have been more detailed.</p><p>Next time, I want to record not only what I did but also why I made each decision, what I found, and what I still need to check. If I change a preprocessing rule or choose a different comparison method, I want to keep track of the reason behind that change.</p><p>This would make it easier to revisit earlier decisions, explain the results, and pick up where I left off without having to reconstruct my thought process.</p><p><strong>Third, I want to try presenting the results myself.</strong></p><p>I worked on the presentation slides for this project, and I’d like to take on the speaking role in a future project. Explaining an analysis to other people requires more than understanding the code. I need to be able to explain why we chose a particular method, what the results mean, and where the limitations are.</p><p>I think that would help me find gaps in my understanding, too.</p><h3>The project is finished, but the learning isn’t</h3><p>This project was my first experience taking a data analysis task from defining the problem all the way to presenting the results. There were times when I felt unsure about our direction, and we had to revisit decisions more than once.</p><p>But those moments were part of what made the project useful.</p><p>I learned that a good analysis starts with a clear question, that preprocessing decisions need a reason behind them, and that the way we compare data can change the story the results tell. I also learned that communicating with teammates and keeping records are not separate from the analysis itself. They are part of how the work gets done.</p><p>There is still a lot I want to improve, especially when it comes to choosing analysis criteria and explaining the results clearly. But I now have a better idea of what to pay attention to in my next project.</p><p>Rather than trying to get everything right from the beginning, I want to get better at asking the right questions, recording my decisions, and checking my work as I go.</p><p>For me, that is one of the most valuable things I took away from this week.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=608b8f5e50bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I Learned About Managing Work During My First Data Analysis Project]]></title>
            <link>https://medium.com/@kwonyounjoo31/what-i-learned-about-managing-work-during-my-first-data-analysis-project-8f1b4efcfca6?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f1b4efcfca6</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 13:49:56 GMT</pubDate>
            <atom:updated>2026-10-15T13:49:56.325Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzdsFo4t8apZDsmdCZ0QvA.jpeg" /></figure><h3>Starting with a Plan</h3><p>GTD (Getting Things Done) is a time and task management method developed by David Allen. The idea is to get tasks out of your head and into a system where you can organize them, decide what needs to be done, and keep track of your progress.</p><p>The process has five steps: capture, clarify, organize, reflect, and engage. First, write down everything you need to do. Then figure out what each task involves, sort them into lists, review your plans, and get to work.</p><p>The Pomodoro Technique can also help. You work for 25 minutes, take a five-minute break, and repeat. After four rounds, you take a longer break of around 15 to 30 minutes.</p><p>There are also several ways to decide which tasks deserve your attention first. ABC analysis groups tasks by importance, the Eisenhower Matrix sorts them by urgency and importance, and the Pareto Principle suggests that a small number of tasks often account for a large share of the results.</p><p>These methods all have something in common: instead of trying to do everything at once, you figure out what matters most and work through it one step at a time.</p><p>I started putting these ideas into practice during my first data analysis project.</p><h3>What Were We Actually Trying to Find Out?</h3><p>My team’s project focused on analyzing cosmetic ingredients and product characteristics. Our main goal was to explore cosmetic ingredient data through exploratory data analysis (EDA) and find useful insights.</p><p>We looked at several factors, including product category (Label), price (Price), rating (Rank), and the skin types each product was suited for: combination, dry, normal, oily, and sensitive.</p><p>We wanted to understand how the ingredients in moisturizers labeled as suitable for different skin types related to their ratings.</p><p>The difficult part was figuring out where to start.</p><p>In previous projects, someone else had usually set the research questions or hypotheses for me. I could focus on carrying out the analysis based on those instructions. This time, my teammates and I had to make those decisions ourselves, from defining the problem to choosing what to analyze. I found that much harder than I expected.</p><p>At first, we came up with questions like these:</p><ul><li>Which ingredients appear most often in products for each skin type?</li><li>How do ingredient frequencies differ between moisturizers with above-average ratings and those with below-average ratings?</li></ul><p>Both questions seemed reasonable. They gave us something specific to investigate, so we were ready to move on to the next step.</p><p>But after thinking about it more, I realized that these questions didn’t quite address what we originally wanted to know.</p><p>We weren’t simply trying to find the most common ingredients for each skin type or compare ingredient frequencies across different rating groups. Our real question was about the relationship between ingredient characteristics and product ratings among moisturizers labeled for different skin types.</p><p>Looking at the data was important, but before we could do that properly, we needed to be clear about what we wanted to learn from it.</p><h3>One Question Changed the Direction of Our Discussion</h3><p>What stands out to me now is that none of us noticed the problem at first. We were so focused on moving forward that we hadn’t stopped to check whether our research questions actually matched our goal.</p><p>Then one of my teammates spoke up and admitted that they weren’t sure what we were supposed to be investigating.</p><p>That opened up a new discussion. We went back to the basics and tried to separate what we already knew from what we still needed to find out. We also reconsidered whether our questions would really help us reach our goal.</p><p>Looking back, what we needed at that point wasn’t a new analysis method or more data. We needed to put what we were trying to do into one clear sentence.</p><p>This experience taught me that defining a problem isn’t something you do once at the beginning of a project and then forget about. As the work progresses, it’s worth checking whether you’re still heading in the right direction.</p><p>This is especially important when working in a team. Even if everyone is working on the same project, that doesn’t necessarily mean everyone understands the goal in the same way.</p><h3>Keep a Record, Share It, and Check Again</h3><p>Another thing I learned from this project was how important communication is.</p><p>Talking with my teammates helped me notice things I hadn’t considered on my own. Sometimes, something that seemed obvious to me turned out to be worth questioning once someone else brought it up. Explaining my own thoughts also helped me spot gaps in my understanding.</p><p>Because of this, we decided to set aside time for regular check-ins. We would review what we had done so far, record our progress, share what we had learned, and decide what to work on next. We also wanted these sessions to give us a chance to take a short break.</p><p>One piece of advice from our tutor stuck with me: keep repeating the cycle of doing the work and recording what you’ve done. Don’t get so caught up in completing tasks that you forget to keep a record.</p><p>It reminded me of my previous work experience, where I often had to check logs. When something went wrong, the logs helped me figure out what had happened and where the problem might have started. Without those records, it would be much harder to trace the cause of an error.</p><p>I think the same applies to a project. It’s useful to record more than just the final results. Keeping track of the decisions we made, the problems we ran into, and what we planned to do next gives us something to look back on.</p><p>A record isn’t just proof that a task was completed. It can also help us make better decisions about what to do next.</p><h3>Start Small Instead of Trying to Plan Everything Perfectly</h3><p>Learning about GTD and the Pomodoro Technique made me realize that managing work isn’t just about using time efficiently. Organizing tasks and setting priorities matter, but so does checking your progress and changing your plans when necessary.</p><p>During this project, we spent time going back and reconsidering our goals because we hadn’t defined them clearly enough at the beginning. It slowed us down, but it also helped us see what we had missed.</p><p>Trying to plan everything perfectly before getting started can make it harder to begin at all. Sometimes, it’s better to start with a small task, keep track of what happens, and review your progress as you go.</p><p>For future projects, I want to get into the habit of listing my tasks before I begin, recording what I do along the way, and checking regularly to see whether my work still matches the original goal.</p><p>I haven’t found a work management method that suits me perfectly yet. But this project has taught me one thing: getting work done isn’t just about completing as many tasks as possible. It’s also about understanding what you’re doing and taking the time to look back at how you’re doing it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f1b4efcfca6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Charts Are for Communication, Not Decoration: What I Learned About Effective Data Visualization]]></title>
            <link>https://medium.com/@kwonyounjoo31/charts-are-for-communication-not-decoration-what-i-learned-about-effective-data-visualization-3f7ea6444658?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f7ea6444658</guid>
            <category><![CDATA[data-storytelling]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[communication-skills]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 14:53:58 GMT</pubDate>
            <atom:updated>2026-10-12T14:53:58.987Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oN7zw2bX-wtVOyEOZAAuyg.jpeg" /></figure><p>When you first start working with data, visualization feels like the fun final step — the part where you take your clean DataFrame, slap on a title, and generate a colorful graph.</p><p>But as I’ve dug deeper into data analytics, I’ve realized that visualization isn’t just about making things look polished. A chart is a communication tool built to bridge the gap between raw numbers and human understanding. If your audience has to squint to figure out what a graph means, the visualization has failed — no matter how sleek it looks.</p><p>Here are my key takeaways on why we visualize data, how human perception shapes chart design, and why your chart titles need to tell a story.</p><h3>1. Why Do We Visualize Data?</h3><p>At its core, data visualization serves two main purposes:</p><ul><li><strong>Instant Comprehension:</strong> Humans process visual patterns vastly faster than raw rows of numbers.</li><li><strong>Seamless Communication:</strong> It transforms complex analytical findings into a shared narrative that stakeholders can act on.</li></ul><p>Before you even touch a plotting library, how you classify your data dictates how you visualize it. Recognizing whether a variable is a discrete category, an ordered sequence, or a continuous numeric range changes everything about how it should be mapped on a screen.</p><h3>2. The Anatomy of a Chart: Marks and Channels</h3><p>Every chart is built from a combination of <strong>marks</strong> and <strong>channels</strong>:</p><ul><li><strong>Marks:</strong> The basic geometric elements representing data points (dots, lines, areas, bars).</li><li><strong>Channels:</strong> The visual properties used to encode data values onto those marks (position, length, color, size, shape).</li></ul><p>Not all channels are created equal. Human eyes are exceptionally good at reading <strong>position</strong> and <strong>length</strong>. When you try to compare data encoded purely by color shades or 3D volumes, accuracy drops sharply. If you want your audience to compare values quickly, put them on a shared baseline using position or length.</p><h3>3. Choosing the Right Chart for the Insight</h3><p>Different questions require completely different visual structures. Here are a few principles for matching your data to the right format:</p><ul><li><strong>Apples-to-Apples Comparison:</strong> To compare categories effectively, place them on the same axis side-by-side.</li><li><strong>Distributions &amp; Summaries:</strong> Box plots are fantastic for summarizing medians and data spread in a single line. Even better? <strong>Overlaying raw data points</strong> on top of the box plot so viewers can see both the summary statistics <em>and</em> the individual underlying values.</li><li><strong>High Cardinality:</strong> If you’re dealing with too many categories for a standard bar chart, switch to a <strong>heatmap</strong> to reveal density patterns.</li><li><strong>Histograms &amp; Bin Widths:</strong> When checking distributions, the width of your bins completely changes the story. Adjusting bin sizes based on the specific insight you want to highlight is key.</li><li><strong>Handling Outliers:</strong> Don’t just hide extreme values. If outliers exist, isolate them or display them separately to investigate root causes (like equipment anomalies or data entry errors).</li></ul><h3>4. The Title Should Be a Message, Not a Label</h3><p>One of the biggest shifts in my thinking is how I approach chart titles.</p><p>For a long time, I treated titles like file names — descriptive labels stating what the chart contained. But a good title should deliver the <strong>core takeaway</strong> before the reader even scans the axes.</p><ul><li><strong>Topic-based title (Weak):</strong> <em>Defect Counts by Process</em></li><li><strong>Message-based title (Strong):</strong> <em>Painting Defects Dropped by Half, While Packaging Errors More Than Doubled</em></li></ul><p>When you design a chart around a message, your focus shifts naturally. You start asking yourself: <em>What actually changed across these processes? What were the exceptional situations? What does my audience need to know right now?</em></p><h3>Final Thoughts: The Graph Is a Conversation</h3><p>A visualization is never just a standalone graphic; it is a conversation between you and your reader.</p><p>If you find yourself adding too many annotations or explaining away confusing design choices, take a step back. Keep asking yourself: <em>How can I make this easier for the other person to grasp?</em> When you treat charts as communication tools rather than decoration, your analysis becomes infinitely more impactful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f7ea6444658" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why if dict.get('영')]]></title>
            <link>https://medium.com/@kwonyounjoo31/why-if-dict-get-%EC%98%81-d94ba8574a87?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/d94ba8574a87</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 11:51:39 GMT</pubDate>
            <atom:updated>2026-10-08T11:52:02.246Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why if dict.get(&#39;영&#39;) Failed while if &#39;영&#39; in dict Worked: Understanding Python Truthiness and Membership</h3><p>When debugging my Python string decoder, a subtle bug caught my attention. The character &#39;영&#39; (zero) wasn&#39;t converting to &#39;0&#39;, while all other Korean digits (&#39;일&#39;, &#39;이&#39;, &#39;삼&#39;) converted properly.</p><p>My instructor’s review pointed out that checking if number_dict.get(letter): was evaluating to False specifically for &#39;영&#39;. At first, I found this confusing: <strong>Why does </strong><strong>get() evaluate to </strong><strong>False when </strong><strong>letter in dictionary evaluates to </strong><strong>True for the exact same key?</strong></p><p>Digging into Python’s evaluation mechanics revealed a fundamental distinction between <strong>membership testing</strong> and <strong>truth value evaluation</strong>, alongside a curious detail about integer 0 versus string &quot;0&quot;.</p><h3>1. Key Membership (in) vs. Value Retrieval (.get())</h3><p>The key difference comes down to what each operation actually tests.</p><p>When you write if letter in number_dict:, Python performs a <strong>membership check on the keys</strong>. It asks a simple boolean question:</p><blockquote>“Does the key &#39;영&#39; exist in number_dict?&quot;</blockquote><p>Because &#39;영&#39; is an active key in the dictionary, in evaluates directly to True—regardless of what value is stored behind that key.</p><pre>number_dict = {&#39;영&#39;: 0}<br><br># Evaluates key presence -&gt; Returns True<br>if &#39;영&#39; in number_dict:<br>    print(&quot;Key exists!&quot;)  # Executes successfully</pre><p>Conversely, when you write if number_dict.get(&#39;영&#39;):, Python performs two distinct steps:</p><ul><li>It retrieves the <strong>value</strong> associated with &#39;영&#39;.</li><li>It evaluates the <strong>truthiness of that returned value</strong> inside the if condition.</li></ul><h3>2. The Falsy Integer 0</h3><p>In my original dictionary, I had mapped the keys to integer values:</p><pre>number_dict = {&#39;영&#39;: 0, &#39;일&#39;: 1, &#39;이&#39;: 2, ...}</pre><p>When evaluating number_dict.get(&#39;영&#39;), the method returned the integer 0.</p><p>In Python, the integer 0 is inherently <strong>falsy</strong> (bool(0) == False). Because the if condition evaluates if 0:, Python treats the condition as failed and jumps straight to the else: block, leaving &#39;영&#39; unmapped</p><pre># Evaluates returned value (0) -&gt; Falsy -&gt; Skips block<br>if number_dict.get(&#39;영&#39;):<br>    print(&quot;Converted!&quot;)<br>else:<br>    print(&quot;Failed!&quot;)  # Executes this branch!</pre><h3>3. What If the Dictionary Used String Values?</h3><p>This led to another realization: <strong>What if the values in my dictionary had been strings (</strong><strong>&#39;0&#39;) instead of integers (</strong><strong>0)?</strong></p><pre>number_dict = {&#39;영&#39;: &#39;0&#39;, &#39;일&#39;: &#39;1&#39;, &#39;이&#39;: &#39;2&#39;, ...}</pre><p>If the dictionary stored string values, number_dict.get(&#39;영&#39;) would return the string &quot;0&quot;.</p><p>In Python’s truthiness rules:</p><ul><li>An <strong>empty string</strong> &quot;&quot; evaluates to False (representing missing/empty state).</li><li>A <strong>non-empty string</strong> containing any character — including &quot;0&quot;—evaluates to True (bool(&quot;0&quot;) == True).</li></ul><pre># String &quot;0&quot; is non-empty -&gt; Truthy -&gt; Evaluates to True<br>if number_dict.get(&#39;영&#39;):<br>    print(&quot;Converted!&quot;)  # Executes successfully!</pre><p>Had I stored the values as string digits initially, the bug would have silently vanished. But relying on string truthiness here would have been a coincidence rather than deliberate logic — it would work simply because &quot;0&quot; happens to be non-empty.</p><h3>Takeaways for Writing Intentional Logic</h3><p>Understanding <em>why</em> these two approaches behaved differently reshaped how I structure conditionals in Python:</p><ul><li><strong>Use </strong><strong>in for Existence Checks:</strong> If your goal is to verify whether a key exists in a dictionary, use if key in dictionary:. It cleanly isolates key presence from value evaluation.</li><li><strong>Beware of Implicit Truthiness on Numeric Data:</strong> When retrieving values with .get(), remember that 0, 0.0, None, and &quot;&quot; all evaluate to False in conditional statements.</li><li><strong>Match Data Types to Usage:</strong> If a decoder’s ultimate output is a string of numbers (e.g., &quot;3524&quot;), storing the dictionary values directly as strings (&#39;0&#39;, &#39;1&#39;) avoids type conversion steps down the line.</li></ul><p>Uncovering the mechanics behind 0 vs. &quot;0&quot; and in vs. .get() turned a puzzling traceback into a much clearer mental model of Python execution.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d94ba8574a87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why 0 Is False: The Hidden Bug in My Python Dictionary Decoder and What It Taught Me About Code…]]></title>
            <link>https://medium.com/@kwonyounjoo31/why-0-is-false-the-hidden-bug-in-my-python-dictionary-decoder-and-what-it-taught-me-about-code-f1ff1544653d?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1ff1544653d</guid>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 14:34:07 GMT</pubDate>
            <atom:updated>2026-10-07T14:34:07.910Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why 0 Is False: The Hidden Bug in My Python Dictionary Decoder and What It Taught Me About Code Edge Cases</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KVxK-__aowndKNi9AjUswA.jpeg" /></figure><p>Receiving detailed feedback on a project is always a turning point. Recently, after completing a set of data processing challenges — ranging from standardizing weight units to decoding legacy equipment codes — I felt a wave of relief seeing that my outputs matched the expected results.</p><p>As someone transitioning into data analysis from a non-CS background, getting code to run successfully often feels like a victory in itself. But digging into the feedback revealed a fascinating edge case hidden inside my logic: <strong>a bug that passed all the initial tests, but would silently fail in production.</strong></p><p>Here is what happened, why a single character (&#39;영&#39; / zero) broke my condition, and how this changed my perspective on writing resilient Python code.</p><h3>The Feature: Decoding Mixed Plant Equipment Codes</h3><p>In manufacturing systems, equipment IDs often contain a chaotic mix of Korean text numerals (&#39;영&#39;, &#39;일&#39;, &#39;이&#39;) and standard ASCII digits (&#39;5&#39;). To standardize these into numeric strings (e.g., &quot;삼5이사&quot; $\rightarrow$ &quot;3524&quot;), I mapped the Korean character keys to numeric values using a dictionary:</p><pre>number_dict = {<br>    &#39;영&#39;: 0, &#39;일&#39;: 1, &#39;이&#39;: 2, &#39;삼&#39;: 3, &#39;사&#39;: 4, <br>    &#39;오&#39;: 5, &#39;육&#39;: 6, &#39;칠&#39;: 7, &#39;팔&#39;: 8, &#39;구&#39;: 9<br>}</pre><p>To transform each character in an equipment code, I wrote a loop that checked whether .get(letter) returned a value from the dictionary:</p><pre># The Flawed Logic<br>def equipment_code_decoder(code_list):<br>    number_dict = {&#39;영&#39;: 0, &#39;일&#39;: 1, &#39;이&#39;: 2, &#39;삼&#39;: 3, &#39;사&#39;: 4, <br>                   &#39;오&#39;: 5, &#39;육&#39;: 6, &#39;칠&#39;: 7, &#39;팔&#39;: 8, &#39;구&#39;: 9}<br>    <br>    decoded_results = []<br>    <br>    for code in code_list:<br>        converted_code = &#39;&#39;<br>        for letter in code:<br>            if number_dict.get(letter):<br>                converted_code += str(number_dict.get(letter))<br>            else:<br>                converted_code += letter<br>        decoded_results.append(converted_code)<br>        <br>    return decoded_results</pre><p>For test cases like &quot;삼5이사&quot; or &quot;48삼구&quot;, this returned perfectly converted outputs (&quot;3524&quot;, &quot;4839&quot;). The code appeared completely sound.</p><h3>The Hidden Trap: Python’s Truth Value Testing</h3><p>The issue surfaced when testing a boundary input containing zero: &quot;영23칠&quot;.</p><pre>Expected output: [0237]<br>Actual output:   [영237]</pre><p>Why did &#39;칠&#39; convert to 7, while &#39;영&#39; stayed as &#39;영&#39;?</p><p>The bug stemmed directly from how Python evaluates conditional statements using .get().</p><ul><li>When letter is &#39;칠&#39;, number_dict.get(&#39;칠&#39;) evaluates to the integer 7. In Python, any non-zero integer is <strong>truthy</strong>, so if 7: resolves toTrue, successfully executing the dictionary replacement.</li><li>When letter is &#39;영&#39;, number_dict.get(&#39;영&#39;) evaluates to the integer 0. However, in Python, <strong>0 is implicitly falsy</strong> (bool(0) == False).</li></ul><p>Because if 0: evaluates to False, Python bypassed the if block entirely and jumped straight to else:, appending the raw character &#39;영&#39; back into the string!</p><h3>Fixing the Structure: Key Existence vs. Value Evaluation</h3><p>The core mistake was judging whether a key exists by checking the <em>truthiness of its value</em>, rather than checking <em>membership in the dictionary</em>.</p><p>To fix this, the condition needs to explicitly check whether the character exists as a key in number_dict, regardless of what integer value that key holds:</p><pre># The Resilient Logic<br>def equipment_code_decoder(code_list):<br>    number_dict = {&#39;영&#39;: &#39;0&#39;, &#39;일&#39;: &#39;1&#39;, &#39;이&#39;: &#39;2&#39;, &#39;삼&#39;: &#39;3&#39;, &#39;사&#39;: &#39;4&#39;, <br>                   &#39;오&#39;: &#39;5&#39;, &#39;육&#39;: &#39;6&#39;, &#39;칠&#39;: &#39;7&#39;, &#39;팔&#39;: &#39;8&#39;, &#39;구&#39;: &#39;9&#39;}<br>    <br>    decoded_results = []<br>    <br>    for code in code_list:<br>        converted_code = &#39;&#39;<br>        for letter in code:<br>            # Check key membership directly instead of evaluating the returned value<br>            if letter in number_dict:<br>                converted_code += number_dict[letter]<br>            else:<br>                converted_code += letter<br>        decoded_results.append(converted_code)<br>        <br>    return decoded_results</pre><p>By switching to if letter in number_dict:, checking &#39;영&#39; evaluates to True because &#39;영&#39; is indeed a key in the dictionary. The character correctly converts to &#39;0&#39;.</p><h3>Mindset Shift: Embracing Edge Cases in Software</h3><p>There’s a famous developer meme about software testing:</p><blockquote>A QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.</blockquote><blockquote>The first real customer enters and asks where the bathroom is. The bar bursts into flames.</blockquote><p>It is easy to feel frustrated when code that passed initial tests fails on an unexpected input. But working through this bug reshaped how I view edge cases.</p><p>A failing edge case isn’t a sign that you are bad at coding — it is an opportunity to make your program more resilient. Finding out <em>why</em> alternative implementations exist (like understanding the subtle difference between .get() truthiness and in key membership) is where real technical depth comes from.</p><p>Moving forward, my goal is to build the habit of actively testing code against boundary inputs — empty lists, zeros, and missing values — before declaring a problem solved.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1ff1544653d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Can’t Trust Raw Data: Lessons from Data Types, Pandas, and Python State]]></title>
            <link>https://medium.com/@kwonyounjoo31/why-you-cant-trust-raw-data-lessons-from-data-types-pandas-and-python-state-7bc80578b349?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bc80578b349</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[pandas]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 11:37:37 GMT</pubDate>
            <atom:updated>2026-10-06T11:37:37.893Z</atom:updated>
            <content:encoded><![CDATA[<p>When you get a new dataset, it’s tempting to jump straight into running calculations, building charts, or training models. But as anyone who has worked with real-world data knows, starting without auditing your input is a recipe for silent bugs and broken logic.</p><p>Before solving a business problem, you have to understand the current state of your data. More importantly, you have to verify whether what <strong>you</strong> see on the screen matches how <strong>pandas</strong> interprets it under the hood.</p><p>Here are my key realizations on verifying data context, understanding file formats, and building a healthy sense of skepticism during data ingestion.</p><h3>1. Spot-Checking Beyond the First Rows</h3><p>The standard first step in exploratory data analysis is calling head(). While checking the top five rows gives you a quick snapshot of column names and structural layout, it rarely tells the full story.</p><p>Pairing head() with tail() lets you inspect boundary conditions and spot anomalies across the dataset&#39;s entire span:</p><pre>import pandas as pd<br><br># Inspecting boundary records<br>print(df.head())<br>print(df.tail())</pre><p>Comparing the beginning and end of a dataset helps reveal structural shifts — such as date formatting changes, appended summary rows, or trailing empty values that accumulated over time.</p><h3>2. Humans See Text; Pandas Infers Types</h3><p>A CSV (Comma-Separated Values) file is just a plain text document. When pandas loads a CSV using read_csv(), it scans the values and makes an educated guess about each column&#39;s data type (int64, float64, object, etc.).</p><p>This is where mismatched interpretations happen. A column meant to contain numerical measurements might be parsed as an object (string) type simply because a single record contains a rogue space, a string placeholder like &quot;N/A&quot;, or an unusual symbol.</p><pre># Always verify how pandas interpreted your columns<br>df.info()</pre><p>Before running summary statistics or mathematical transformations, you must inspect df.info() to confirm that every column&#39;s inferred data type matches its real-world physical meaning.</p><h3>3. Auditing Missing Values and Summary Statistics</h3><p>Once data types are aligned, checking statistical distributions and null value counts reveals data quality issues:</p><ul><li><strong>Basic Statistics with </strong><strong>describe():</strong> Calling df.describe() outputs summary metrics (count, mean, standard deviation, quartiles). If a numeric column is missing from this output, pandas likely parsed it as a string.</li><li><strong>Locating Missing Data with </strong><strong>isna():</strong> To find null values across columns, combining .isna() with .sum() yields a clear, column-by-column tally.</li></ul><pre># Count missing values per column<br>missing_counts = df.isna().sum()<br><br># Isolate missing rows using boolean masking<br>missing_rows = df[df[&#39;measurement_col&#39;].isna()]</pre><p>Using boolean masks allows you to filter out missing records directly, giving you complete visibility into <em>where</em> and <em>why</em> data drops out.</p><h3>4. File Formats Matter: CSV vs. Pickle</h3><p>Understanding how datasets are serialized changes how you handle persistence across sessions:</p><p><strong>FeatureCSV (.csv)Pickle (.pkl)Storage Medium</strong>Plain text (human-readable)Binary stream<strong>Data Types</strong>Inferred upon import (can lose explicit types)Preserves exact Python types (datetime, category, etc.)<strong>Complex Objects</strong>Limited to flat tabular textStores arbitrary Python objects (dicts, lists, models)</p><p>When loading CSVs, you must always re-verify column types because text serialization strips out type metadata. If you need to save a preprocessed DataFrame while preserving its exact data types across python sessions, saving it as a binary .pkl file avoids re-parsing.</p><h3>Final Thoughts: Computer World vs. Human World</h3><p>If there is one major takeaway from working with raw data, it is this: <strong>never assume a dataset is clean just because it loaded without throwing an error.</strong></p><p>Humans and computers perceive datasets differently. You see a column of sales figures; pandas sees a sequence of string objects because of a single misplaced comma. To use analytical tools effectively, you shouldn’t just know how to write syntax — you need to understand how the underlying tool interprets the data you pass into it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bc80578b349" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking into Data Analytics: Understanding Roles, Data Wrangling, and Pandas Fundamentals]]></title>
            <link>https://medium.com/@kwonyounjoo31/breaking-into-data-analytics-understanding-roles-data-wrangling-and-pandas-fundamentals-973db1496832?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/973db1496832</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 11:57:13 GMT</pubDate>
            <atom:updated>2026-10-02T11:57:13.558Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4MSqBxv731BQIO4_f-G0w.jpeg" /></figure><p>When you start learning data analytics, the sheer volume of concepts can feel overwhelming. You quickly realize that “Data Analyst” isn’t just one static job title — it spans a spectrum of specializations, from defining business metrics to building predictive machine learning models.</p><p>Along with understanding these roles, mastering the mechanics of data manipulation becomes your daily work. Here is a breakdown of how different data roles operate, why preprocessing and visualization are inseparable, and how essential pandas operations form the foundation of data analysis.</p><h3>Part 1: Navigating the Data Role Spectrum</h3><p>Different organizations define data roles according to their operational needs. Understanding these distinctions helps clarify which focus areas align best with your career goals.</p><p><strong>RolePrimary FocusKey Responsibilities &amp; MethodsBusiness</strong></p><ul><li><strong>Analyst (BA)</strong>Solving business problems &amp; supporting decisionsProcess improvement, business model evaluation, requirements gathering.</li><li><strong>Product Analyst (PA): </strong>Evaluating and optimizing product performance. User behavior tracking, funnel analysis, A/B testing.</li><li><strong>BI Analyst (BI): </strong>Transforming enterprise data into visual insights. Dashboard engineering, enterprise reporting, maintaining BI platforms.</li><li><strong>Data Scientist (DS): </strong>Predictive modeling &amp; complex pattern discovery. End-to-end data pipelines, statistical modeling, machine learning / deep learning.</li></ul><h3>Part 2: The Symbiosis of Preprocessing and Visualization</h3><p>Data rarely arrives ready for presentation. Raw datasets are cluttered with irrelevancies, missing values, and formatting inconsistencies.</p><pre>[ Raw Data ] ---&gt; ( Preprocessing &amp; Cleaning ) ---&gt; [ Curated Data ] ---&gt; ( Visualization ) ---&gt; [ Actionable Insights ]</pre><p>The core objective of data analysis is clear communication. To deliver actionable insights to stakeholders, you must visualize the metrics that matter. However, <strong>effective visualization is impossible without targeted preprocessing.</strong></p><p>Data preprocessing encompasses every transformational action required to filter, clean, and structure raw input into a usable format. Preprocessing isolates the signal from the noise; visualization makes that signal understandable.</p><h3>Part 3: Essential Data Manipulation with Pandas</h3><p>In Python, pandas serves as the primary library for tabular data manipulation. Mastering how DataFrames handle indexing, filtering, and structural changes is fundamental to daily analysis tasks.</p><h3>1. Setting Up and Persisting Data</h3><pre>import pandas as pd<br><br># Exporting a DataFrame to CSV<br>df.to_csv(&quot;processed_data.csv&quot;, index=False)</pre><h3>2. Indexes and Column Operations</h3><p>DataFrames use zero-based indexing by default. Assigning explicit index values allows for targeted row retrieval, sorting, and structural alignment.</p><pre># Accessing full column series<br>user_ages = df[&#39;age&#39;]<br><br># Renaming columns for consistency<br>df = df.rename(columns={&#39;old_name&#39;: &#39;new_name&#39;})<br># Adding and removing columns<br>df[&#39;new_column&#39;] = df[&#39;existing_column&#39;] * 2<br>df = df.drop(columns=[&#39;unnecessary_column&#39;])</pre><h3>3. Summary Statistics and Missing Values</h3><p>Inspecting dataset distributions and identifying missing data are critical first steps in exploratory data analysis.</p><pre># View summary statistics (mean, std, min, max, quartiles)<br>print(df.describe())<br><br># Check structural info and non-null counts<br>df.info()<br># Count missing values per column<br>print(df.isna().sum())</pre><h3>4. Navigating Data: iloc vs. loc</h3><p>Understanding the distinction between positional indexing (iloc) and label-based indexing (loc) prevents common data selection bugs.</p><ul><li><strong>iloc (Integer Location):</strong> Selects rows and columns purely by integer position.</li><li><strong>loc (Label Location):</strong> Selects data using index labels and explicit column names.</li></ul><pre># Selection by position: Row index 0, Column index 1<br>value_by_position = df.iloc[0, 1]<br><br># Selection by label: Row index label &#39;user_101&#39;, Column &#39;status&#39;<br>value_by_label = df.loc[&#39;user_101&#39;, &#39;status&#39;]</pre><h3>Part 4: Filtering Data with Boolean Indexing</h3><p>Filtering datasets based on conditional logic is essential for isolating target subsets.</p><h3>Single and Compound Conditions</h3><p>When combining multiple conditions in pandas, wrap each conditional statement in parentheses and use bitwise operators (&amp; for AND, | for OR).</p><pre># Single condition matching<br>active_users = df[df[&#39;status&#39;] == &#39;active&#39;]<br><br># Compound AND condition<br>high_value_active = df[(df[&#39;status&#39;] == &#39;active&#39;) &amp; (df[&#39;spend&#39;] &gt;= 1000)]<br># Compound OR condition<br>flagged_users = df[(df[&#39;status&#39;] == &#39;suspended&#39;) | (df[&#39;risk_score&#39;] &gt; 80)]</pre><h3>Matching Categories with .isin()</h3><p>When searching for rows where a column value matches any item in a predefined list, .isin() offers a clean alternative to chaining multiple OR statements.</p><pre># Filter rows matching specific regions<br>target_regions = [&#39;US-East&#39;, &#39;EU-West&#39;, &#39;AP-East&#39;]<br>filtered_df = df[df[&#39;region&#39;].isin(target_regions)]</pre><h3>Summary Takeaways</h3><p>Building competence in data analytics requires balancing conceptual domain knowledge with practical code execution:</p><ul><li><strong>Target the Right Problem:</strong> Align your analytical strategy with the specific requirements of the role (Business, Product, BI, or Data Science).</li><li><strong>Clean Before Displaying:</strong> View preprocessing as the necessary foundation for impactful, clear data visualizations.</li><li><strong>Master Selection Mechanics:</strong> Know when to leverage label-based (loc), positional (iloc), or boolean indexing (isin) to query datasets efficiently.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=973db1496832" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Building String Decoders and Multi-Key Sorting Taught Me About Data Structures and Scope]]></title>
            <link>https://medium.com/@kwonyounjoo31/what-building-string-decoders-and-multi-key-sorting-taught-me-about-data-structures-and-scope-c3e07eda70bb?source=rss-cb21f9f79f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3e07eda70bb</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Stella Kwon]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 11:12:13 GMT</pubDate>
            <atom:updated>2026-10-01T11:12:13.511Z</atom:updated>
            <content:encoded><![CDATA[<p>When you’re working through real-world data engineering exercises — like standardizing legacy plant codes or building dispatch algorithms for warehouse stock — it’s easy to focus solely on getting the “right” output. But as any developer quickly learns, the real work happens in the messy middle: wrestling with variable scopes, understanding type representations, and realizing how Python actually evaluates data under the hood.</p><p>Recently, I worked through two practical data transformation challenges. Here is how working through tracebacks, debugging nested loops, and experimenting with lambda keys shifted how I approach problem-solving in Python.</p><h3>Part 1: Decoding Mixed Plant Equipment Codes</h3><h3>The Challenge</h3><p>In manufacturing maintenance systems, raw equipment records often arrive as a chaotic mix of Korean text numerals (“삼”, “오”) and standard digits (“5”). To build reliable tracking schedules, these mixed strings need to be decoded into uniform numeric representations (e.g., &quot;삼5이사&quot; $\rightarrow$ &quot;3524&quot;).</p><p>My first instinct was to map Korean characters to digits using a dictionary and iterate over the input strings:</p><pre>number_dict = {&#39;영&#39;:0, &#39;일&#39;:1, &#39;이&#39;:2, &#39;삼&#39;:3, &#39;사&#39;:4, &#39;오&#39;:5, &#39;육&#39;:6, &#39;칠&#39;:7, &#39;팔&#39;:8, &#39;구&#39;:9}</pre><h3>Problem 1: Iterating Over Full Strings vs. Individual Characters</h3><p>My initial code attempted to match entire code strings directly against dictionary keys:</p><pre># Initial Attempt - Conceptual Flaw<br>def equipment_code_decoder(code_list):<br>    number_dict = {&#39;영&#39;:0, &#39;일&#39;:1, &#39;이&#39;:2, &#39;삼&#39;:3, &#39;사&#39;:4, &#39;오&#39;:5, &#39;육&#39;:6, &#39;칠&#39;:7, &#39;팔&#39;:8, &#39;구&#39;:9}<br>    converted_code = []<br>    <br>    for code in code_list:<br>        if code in number_dict:<br>            converted_code.append(str(number_dict[code]))<br>        else:<br>            converted_code.append(code)</pre><p>Running this produced output like [&#39;삼5이사&#39;, &#39;0오6칠&#39;, ...]—the strings remained completely untouched!</p><p>I initially assumed slicing (code_list[0:]) would break the strings into characters, but Python treated code as the entire string (like &quot;삼5이사&quot;). To inspect individual characters, I needed an inner loop:</p><pre>for code in code_list:<br>    for letter in code:<br>        print(letter)  # Outputs: &#39;삼&#39;, &#39;5&#39;, &#39;이&#39;, &#39;사&#39; sequentially</pre><h3>Problem 2: Checking Dictionary Key Existence</h3><p>With the character loop working, I tried verifying key membership using if letter in number_dict == True:. However, chaining comparison operators led to unexpected evaluation, resulting in blank outputs.</p><p>Switching to number_dict.get(letter) simplified the logic. If letter exists in the dictionary, .get() returns its numeric value; otherwise, it returns None (evaluating to False).</p><pre>if number_dict.get(letter) is not None:<br>    # Character is a Korean digit<br>    converted_val = str(number_dict.get(letter))<br>else:<br>    # Character is already an ASCII digit<br>    converted_val = str(letter)</pre><h3>Problem 3: The Accumulator Scope Bug</h3><p>After stringing the characters together, I hit a strange issue where outputs kept appending continuously:</p><pre>3524<br>35240567<br>352405674839<br>3524056748392748<br>...</pre><p>The issue wasn’t the loop logic — it was the <strong>placement of the accumulator variable</strong>. Initializing converted_code = &quot;&quot; <em>outside</em> the outer loop caused decoded characters from every equipment code to concatenate into a single growing string.</p><p>Moving converted_code = &quot;&quot; <em>inside</em> the outer loop ensured a clean accumulator state for each code string:</p><pre># Working Equipment Code Decoder<br>def equipment_code_decoder(code_list):<br>    number_dict = {&#39;영&#39;: &#39;0&#39;, &#39;일&#39;: &#39;1&#39;, &#39;이&#39;: &#39;2&#39;, &#39;삼&#39;: &#39;3&#39;, &#39;사&#39;: &#39;4&#39;, <br>                   &#39;오&#39;: &#39;5&#39;, &#39;육&#39;: &#39;6&#39;, &#39;칠&#39;: &#39;7&#39;, &#39;팔&#39;: &#39;8&#39;, &#39;구&#39;: &#39;9&#39;}<br>    <br>    decoded_results = []<br>    <br>    for code in code_list:<br>        converted_code = &quot;&quot;  # Reset accumulator for each equipment code<br>        for letter in code:<br>            if letter in number_dict:<br>                converted_code += number_dict[letter]<br>            else:<br>                converted_code += letter<br>        decoded_results.append(converted_code)<br>        <br>    return decoded_results<br><br># Test Execution<br>equipment_codes = [&quot;삼5이사&quot;, &quot;0오6칠&quot;, &quot;48삼구&quot;, &quot;이74팔&quot;, &quot;9일이삼&quot;]<br>print(equipment_code_decoder(equipment_codes))<br># Output: [&#39;3524&#39;, &#39;0567&#39;, &#39;4839&#39;, &#39;2748&#39;, &#39;9123&#39;]</pre><h3>Part 2: Warehouse Priority Sorting with Lambdas</h3><h3>The Challenge</h3><p>The second problem involved prioritizing product dispatches from a logistics warehouse. To optimize storage and revenue, items needed to be sorted using multi-level criteria:</p><ul><li><strong>Low Stock First:</strong> Prioritize items with lower stock quantities (stock in ascending order) to clear warehouse floor space.</li><li><strong>Higher Price First:</strong> If stock counts match, prioritize items with higher unit prices (price in descending order) to maximize immediate revenue.</li></ul><h3>The Problem: Over-Indexing in Lambda Expressions</h3><p>To sort a list of dictionary objects, I turned to Python’s sorted() function with a custom lambda key:</p><pre>products = [<br>    {&quot;name&quot;: &quot;Part_A&quot;, &quot;stock&quot;: 10, &quot;price&quot;: 1000},<br>    {&quot;name&quot;: &quot;Part_B&quot;, &quot;stock&quot;: 5,  &quot;price&quot;: 3000},<br>    {&quot;name&quot;: &quot;Part_C&quot;, &quot;stock&quot;: 10, &quot;price&quot;: 2500},<br>    {&quot;name&quot;: &quot;Part_D&quot;, &quot;stock&quot;: 5,  &quot;price&quot;: 1500}<br>]</pre><p>My initial attempt threw an error:</p><pre># Initial Attempt - Over-indexing Error<br>sorted_products = sorted(products, key=lambda x: (x[0][&#39;stock&#39;], -x[0][&#39;price&#39;]))</pre><p>I had assumed x represented the full dataset list and tried indexing into x[0]. But in Python&#39;s sorted() function, the key parameter evaluates <strong>each element of the list individually</strong>. Here, x is already a single dictionary object (e.g., {&quot;name&quot;: &quot;Part_A&quot;, ...}).</p><p>Indexing x[0] tried to perform integer-key lookups on a dictionary whose keys were strings, causing a KeyError.</p><h3>The Working Solution</h3><p>Removing the redundant [0] indexing resolved the error immediately. Using a tuple (x[&#39;stock&#39;], -x[&#39;price&#39;]) instructs Python to sort by stock ascending, then break ties using -x[&#39;price&#39;] (reversing numeric order for descending sorting).</p><pre>def sort_products(products):<br>    # Sort by stock (ascending), then by price (descending using negative value)<br>    return sorted(products, key=lambda x: (x[&#39;stock&#39;], -x[&#39;price&#39;]))<br><br># Test Execution<br>sorted_products = sort_products(products)<br>for p in sorted_products:<br>    print(p)<br># Output:<br># {&#39;name&#39;: &#39;Part_B&#39;, &#39;stock&#39;: 5, &#39;price&#39;: 3000}<br># {&#39;name&#39;: &#39;Part_D&#39;, &#39;stock&#39;: 5, &#39;price&#39;: 1500}<br># {&#39;name&#39;: &#39;Part_C&#39;, &#39;stock&#39;: 10, &#39;price&#39;: 2500}<br># {&#39;name&#39;: &#39;Part_A&#39;, &#39;stock&#39;: 10, &#39;price&#39;: 1000}<br></pre><h3>Key Takeaways</h3><ul><li><strong>Check Variable Scope in Nested Loops:</strong> Unexpected output growth often stems from accumulators declared in the wrong block scope. Always verify where variables are reset.</li><li><strong>Understand What </strong><strong>lambda Arguments Represent:</strong> When passing key functions to sorted() or min(), remember that the lambda parameter represents a single element of the collection, not the collection as a whole.</li><li><strong>Print-Driven Debugging Is Essential:</strong> Isolating problem steps with print() statements reveals whether an issue is caused by syntax, incorrect data types, or unexpected looping behavior.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3e07eda70bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>