<?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 Leah Cole on Medium]]></title>
        <description><![CDATA[Stories by Leah Cole on Medium]]></description>
        <link>https://medium.com/@leah.e.cole?source=rss-d28c3589047a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dCvg7pyBKHHVHW4jW2cDhg.jpeg</url>
            <title>Stories by Leah Cole on Medium</title>
            <link>https://medium.com/@leah.e.cole?source=rss-d28c3589047a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:08:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leah.e.cole/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[How to figure out what Google Cloud project a Cloud Storage bucket is in]]></title>
            <link>https://medium.com/@leah.e.cole/how-to-figure-out-what-google-cloud-project-a-cloud-storage-bucket-is-in-d84774e0d7b2?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d84774e0d7b2</guid>
            <category><![CDATA[google-cloud-storage]]></category>
            <category><![CDATA[gcloud-commands]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gcp]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Wed, 26 Apr 2023 22:32:29 GMT</pubDate>
            <atom:updated>2023-04-26T22:32:29.557Z</atom:updated>
            <content:encoded><![CDATA[<p>Earlier today a friend said to me, “How do I know what Google Cloud project a Cloud Storage (GCS) bucket is in? I want to be able to look at it in the Cloud Console!” This was a fair question, because there are cases where it may not be immediately obvious!</p><p>Let’s say you have been given the ID of a GCS bucket: LeahsAmazingBucket (I am using a fake and invalid <a href="https://cloud.google.com/storage/docs/buckets#naming">bucket name </a>here so if you try these operations with this bucket name they will fail.)</p><h3>What can you do without the project info?</h3><p>Given only the bucket ID, assuming you are logged into the Cloud Console and you have permissions that allow you to access this bucket, you can browse the bucket contents by going straight to its Cloud Console URL: <a href="https://console.cloud.google.com/storage/browser/LeahsAmazingBucket">https://console.cloud.google.com/storage/browser/LeahsAmazingBucket</a>. If you look closely in the upper left hand corner, you will see the words “Select a Project” instead of the project name, but you will still be able to see your bucket details.</p><figure><img alt="screenshot of the cloud console with the “Select a project” dropdown visible" src="https://cdn-images-1.medium.com/max/1024/1*kSIHuSM3PSX716sAMrxJzQ.png" /></figure><p>You can also run certain <a href="https://cloud.google.com/sdk/gcloud">gcloud</a> and <a href="https://cloud.google.com/storage/docs/gsutil">gsutil</a> commands without knowing the project name. For example, you can run gsutil ls gs://LeahsAmazingBucket to see the bucket contents.</p><h3>How to get the project info for your bucket?</h3><p>If just being able to access the bucket without knowing the project info is enough, then great! But, if you still need this info, you can do the following:</p><ol><li>In <a href="https://cloud.google.com/shell">Cloud Shell</a> or in a terminal where you are <a href="https://cloud.google.com/sdk/gcloud/reference/auth/login">authenticated to gcloud</a>, run gcloud storage buckets describe gs://LeahsAmazingBucket This will return information about your bucket including the projectNumber in string format. In this example, the project number is 0123456789</li></ol><pre>etag: CAo=<br>iamConfiguration:<br>  bucketPolicyOnly:<br>    enabled: true<br>    lockedTime: &#39;2021-08-02T18:39:08.407000+00:00&#39;<br>  publicAccessPrevention: inherited<br>  uniformBucketLevelAccess:<br>    enabled: true<br>    lockedTime: &#39;2021-08-02T18:39:08.407000+00:00&#39;<br>id: LeahsAmazingBucket<br>kind: storage#bucket<br>location: US<br>locationType: multi-region<br>metageneration: &#39;10&#39;<br>name: LeahsAmazingBucket<br>projectNumber: &#39;0123456789&#39;<br>rpo: DEFAULT<br>selfLink: https://www.googleapis.com/storage/v1/b/LeahsAmazingBucket<br>storageClass: STANDARD<br>timeCreated: &#39;2021-05-04T18:39:08.407000+00:00&#39;<br>updated: &#39;2021-09-01T18:17:27.317000+00:00&#39;</pre><p>2. Run gcloud projects describe &lt;yourProjectNumber&gt; with the project number from step 1. For example, gcloud projects describe 0123456789. This will return a config object that has the name and project ID of your project!</p><pre>createTime: &#39;2018-11-27T19:38:55.858Z&#39;<br>lifecycleState: ACTIVE<br>name: LeahsAmazingProject<br>parent:<br>  id: &#39;987654321&#39;<br>  type: folder<br>projectId: LeahsAmazingProject<br>projectNumber: &#39;0123456789&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d84774e0d7b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Python to Turn iCalendar Data into a CSV of Dates]]></title>
            <link>https://medium.com/@leah.e.cole/how-to-use-python-to-turn-icalendar-data-into-a-csv-of-dates-93d95926231d?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/93d95926231d</guid>
            <category><![CDATA[csv-file]]></category>
            <category><![CDATA[data-ingestion]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Wed, 17 Feb 2021 00:21:58 GMT</pubDate>
            <atom:updated>2021-02-17T02:50:15.840Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Problem</h3><p>In summer 2020, I presented my interns with the task of writing a tutorial with a data ingestion component. We had many talks about appropriate data sources in the effort to find data that were relevant to our tutorial, easy to obtain, had a license appropriate for our use case, and would not introduce bias in a trained Machine Learning model. However, I made a crucial oversight: I failed to consider what would happen if one of those data sources suddenly disappeared.</p><p>In early 2021, I discovered that a Kaggle dataset featuring a CSV of United States Federal Holidays from 1966-present was no longer available. I still needed this data for the model training portion of the tutorial I was writing. The good news: this information is public knowledge and was still available in other formats; I just had to figure out a new source and how to convert it to the format my tutorial was expecting.</p><h4>The Options</h4><ol><li>Azure has <a href="https://azure.microsoft.com/en-us/services/open-datasets/catalog/public-holidays/">a worldwide public holidays dataset covering multiple countries</a> (including the USA). This option initially looked like it would be the best option (and I’m hoping to incorporate it into some future multi-cloud tutorials) but because of the approvals I would need to use it (I work on Google Cloud Platform), combined with my total inexperience using Azure, it was not a viable option for this tutorial.</li><li><a href="https://www.kaggle.com/donnetew/us-holiday-dates-2004-2021">A different Kaggle dataset </a>that had the same information and was actually derived from the original dataset I had been using. This option had two drawbacks: it only covered from 2004–2021, and it also came from an individual user, so it had the same risk that the link may stop working at any time</li><li>An <a href="https://www.opm.gov/about-us/open-government/Data/Apps/Holidays/ical.aspx">iCalendar file</a> from the <a href="https://www.opm.gov/about-us/open-government/Data/Apps/Holidays/Index.aspx">United States Office of Personnel Management website</a> that had all US Federal Holidays from 1997–2021. At first, this option seemed like it was the most ridiculous. It is a random calendar file intended to be used to tell you if a certain day is or is not a federal holiday. It is not at all in the format I needed. It does not contain as much data as the original source (starts in 1997 instead of 1966.) However, this option was the best option for me for two reasons: it came from an official government source, and it had no licensing restrictions. I also did not actually need the data from 1966–1996, so that 30 year omission did not matter. Was this the absolute BEST solution for my use case? Probably not, but no solution is perfect, and this one was absolutely good enough.</li></ol><h4>Why Would I Ever Want to Do This?</h4><p>Dear reader, I hope you do not have to do this. I also know that data works in mysterious ways, and sometimes finding the right data for your use case requires some creativity. So, if you find yourself in a conundrum like mine, please proceed.</p><h3>The Data</h3><p>Now that I had a valid data source, I needed to convert it from <a href="https://icalendar.org/#:~:text=iCalendar%20is%20a%20standard%20method,ical%22%20%22.">iCalendar format</a> into a <a href="https://tools.ietf.org/html/rfc4180">CSV file</a>.</p><h4>The Data in <a href="https://tools.ietf.org/html/rfc5545">iCalendar Format</a></h4><p>iCalendar files have sections that begin with BEGIN:tags and end with END: tags. The VCALENDAR section includes all other sections. In this data, the most important sections are events, which are contained in VEVENT sections.</p><p>Within an event, there are two additional fields important for my use case: DTSTART and SUMMARY . DTSTART is the date when the event begins. There is an additional DTEND field, but I ignored that because there are no Federal Holidays in the United States that last longer than one day, so the duration is not relevant. The SUMMARY field is the name of the holiday.</p><p><a href="https://github.com/leahecole/convert-ics-to-csv/blob/main/test_data/holidays-test.ics">This example (also shown below) is a snippet of the data</a> used in this post (and is additionally used in the tests for this code.) It is in iCalendar format and contains one calendar event — New Year’s Day 1997. Note the VCALENDAR, VEVENT , DTSTART , and SUMMARY tags.</p><pre>BEGIN:VCALENDAR<br>VERSION:2.0<br>PRODID:-//Telerik Inc.//NONSGML RadScheduler//EN<br>METHOD:PUBLISH<br>BEGIN:VEVENT<br>DTSTART:19970101<br>DTEND:19970102<br>UID:20210211T185111Z-05fe6751-ec1d-4532-b3a8-60e48e0eb064<br>DTSTAMP:20210211T185111Z<br>SUMMARY:New Year’s Day<br>DESCRIPTION:<br>END:VEVENT<br>END:VCALENDAR</pre><h4>The Data in CSV Format</h4><p>For my purposes, the only information I needed from the events in this iCalendar file is the date of the holiday (the DTSTARTfield) and the name (the SUMMARY field.) I needed to write code that would convert the previous snippet into the following CSV format:</p><pre>Date,Holiday<br>1997-1-1,New Year’s Day</pre><h3>The Conversion</h3><p>Luckily, there exists <a href="https://pypi.org/project/ics/">a package on PyPI</a> called ics that is specifically made to read and write iCalendar data that respects the <a href="https://tools.ietf.org/html/rfc5545">original rfc5545 specification</a>, and reading from and writing to CSVs is so common in Python that the <a href="https://docs.python.org/3/library/csv.html">functionality is part of the core library</a>. I just needed to figure out how to put these two tools together. I broke the conversion down into three steps:</p><ol><li>Use Python I/O functionality to <a href="https://github.com/leahecole/convert-ics-to-csv/blob/5044f87e3dc468da1239a5510ba8968342b27c97/ics_to_csv.py#L5-L14">read the original contents of the holiday file and put it into a big long string</a>.</li><li><a href="https://github.com/leahecole/convert-ics-to-csv/blob/5044f87e3dc468da1239a5510ba8968342b27c97/ics_to_csv.py#L17-L24">Use the </a><a href="https://github.com/leahecole/convert-ics-to-csv/blob/5044f87e3dc468da1239a5510ba8968342b27c97/ics_to_csv.py#L17-L24">ics library to convert that string into event objects</a> , then <a href="https://github.com/leahecole/convert-ics-to-csv/blob/5044f87e3dc468da1239a5510ba8968342b27c97/ics_to_csv.py#L26-L36">create a list of events, where each event is a list containing the date of the holiday and the name</a>.</li><li><a href="https://github.com/leahecole/convert-ics-to-csv/blob/5044f87e3dc468da1239a5510ba8968342b27c97/ics_to_csv.py#L39-L43">Write the list of events to a CSV file</a></li></ol><p>Here’s what output of each step would look like on <a href="https://github.com/leahecole/convert-ics-to-csv/blob/main/test_data/holidays-test.ics">the example snippet</a>:</p><p><strong>Step 1</strong>: a multi-line string that looks just like the input iCalendar file</p><pre>BEGIN:VCALENDAR<br>VERSION:2.0<br>PRODID:-//Telerik Inc.//NONSGML RadScheduler//EN<br>METHOD:PUBLISH<br>BEGIN:VEVENT<br>DTSTART:19970101<br>DTEND:19970102<br>UID:20210211T185111Z-05fe6751-ec1d-4532-b3a8-60e48e0eb064<br>DTSTAMP:20210211T185111Z<br>SUMMARY:New Year’s Day<br>DESCRIPTION:<br>END:VEVENT<br>END:VCALENDAR</pre><p><strong>Step 2</strong>: an object containing the event(s), then a list of events (in this case, the list contains a single event)</p><pre>{&lt;all-day Event &#39;New Year’s Day&#39; begin:1997-01-01 end:1997-01-02&gt;}<br>[[&#39;Date&#39;, &#39;Holiday&#39;], [&#39;1997-1-1&#39;, &#39;New Year’s Day&#39;]]</pre><p><strong>Step 3</strong>: a CSV with two columns: Date and Holiday</p><pre>Date,Holiday<br>1997-1-1,New Year’s Day</pre><p><strong>Step 4</strong>: CELEBRATE. This is exactly what I needed.</p><h4>The Code</h4><p>I could have made one long, untested Python script to do this conversion once, but I chose to break up this script into multiple parts and write it as cleanly as possible including tests both as a gift to my future self and to anyone else who may like to use it. <a href="https://github.com/leahecole/convert-ics-to-csv">The code, tests, and test data can be found in this repository</a>. Please feel free to adapt it for your own iCalendar-to-CSV conversion needs.</p><h3>Lessons Learned</h3><ul><li>Always consider the availability of your source data and think about how it would affect your use case if it disappeared</li><li>When unfamiliar code is well-documented, using it is much less frustrating! (thanks, ics !!)</li><li>Small projects like these are always a good opportunity to practice using new-to-you technologies (Hello, <a href="https://github.com/leahecole/convert-ics-to-csv/blob/main/.github/workflows/main.yml">GitHub Actions</a>!)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93d95926231d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2018 Professional Year in Review]]></title>
            <link>https://medium.com/@leah.e.cole/2018-professional-year-in-review-50bccaab2174?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/50bccaab2174</guid>
            <category><![CDATA[self-reflection]]></category>
            <category><![CDATA[2018]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 18:01:31 GMT</pubDate>
            <atom:updated>2019-10-30T15:28:42.246Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>What I Did, and The Results</strong></h4><h4>What I Did</h4><p>In late January of 2018, I started keeping better track of what I was doing. Inspired by a combination of advice from disciplined colleagues and suggestions from the <a href="https://getmarlow.com/dailychallenge">Marlow Daily Challenge</a> I made a note in my favorite note taking app called “2018 Weekly Goals and Reviews.” It comprised of two types of entries: “Three Specific Goals” and “Week in Review”.</p><p>Every Monday (sometimes even the Friday before), I wrote my “Three Specific Goals” entry. It’s exactly what it sounds like — I picked out three actionable, concrete goals for the upcoming week, and I typed them with checkboxes in this note so I could clearly see if they had been done or not. Most of the time they were all work related, but if there was something I really needed to get done outside of work, I would include that as well.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3o751X8AveBsujq3fO%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3o751X8AveBsujq3fO%2Fgiphy-downsized.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3o751X8AveBsujq3fO%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/32ff4416774a7337d2c56905a790e1a9/href">https://medium.com/media/32ff4416774a7337d2c56905a790e1a9/href</a></iframe><p>Every Friday, I wrote my “Week in Review” entry. Each of these entries has five components, each of which only has about one sentence, which keeps the entry short easy to look back on. The components are:</p><ol><li><strong>Score: </strong>Every week gets a whole number score from 1 to 5, with 1 being the worst week possible and 5 being the best week ever.</li><li><strong>High Point: </strong>This is the best thing that happened this week. Ideally a professional thing, but if work life was rough this week, it is okay to put a personal win. Try to only have one thing.</li><li><strong>Low Point:</strong> This is the worst thing that happened this week. Ideally a professional thing, but sometimes personal things creep in and make work life tough, and that is completely legitimate and worth noting.</li><li><strong>What Could Have Made This Week Better</strong>: It is okay to have low points, but it is important for me to think about how the low points could be made better. Here is where I force myself to think about what could have been done, especially by me, to make the week better.</li><li><strong>What Did You Do:</strong> This is where I make some bullet points about what I did, so that when it comes for performance review time, I can actually see concretely what I was working on.</li></ol><h4>The Results</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5pUHtgG70JjO9YHZPD%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F5pUHtgG70JjO9YHZPD%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F5pUHtgG70JjO9YHZPD%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/80514b6974a6e1bf326bfe4823dc3b65/href">https://medium.com/media/80514b6974a6e1bf326bfe4823dc3b65/href</a></iframe><ul><li>Average week score was 3.56. (Calculated by dividing the sum of all of the weeks/the number of weeks I actually gave ratings)</li><li>I did this exercise 33/52 weeks this year. At first, I was dismayed that I only did this exercise for 63% of the year. 63? That would be an F in school! However, I took 4 weeks off in between jobs (now we’re thinking 48 weeks in a year, that brings me up 33/48, or 68%), I went on vacation over the summer, I attended a number of weddings, and holidays like Christmas and Thanksgiving made for some short weeks here and there (let’s say that takes away another 3 weeks, so we’re at 45 weeks, which brings me up to 33/45, or 73.3%). 73 is a passing grade. Not a great one, but it’s still pretty decent!</li><li>I didn’t start using the checkboxes to keep track of my “Three Specific Things” until I was 3 weeks in, but I only completed all three items seven of the thirty weeks that had checkboxes. 7/30? That’s 23% of the time. Now, this could be interpreted as “Leah is bad at getting things done”, which, occasionally is true. We all have our off days. But on the whole, a 23% completion rate does not accurately represent my overall work performance. What it does tell me though, is that I need to improve on what I choose as my “Three Specific Things”, and in general, my goal-setting skills. I wasn’t leaving these items incomplete because I was sitting doing nothing —I was leaving them incomplete because more pressing items came up. A lot of factors affected this — team priorities changed, I changed jobs and am learning to navigate a new landscape, and also, things just come up. I am learning to create goals that help me get my work done, push me to grow and develop, and also anticipate the needs of whatever team and organization I am a part of.</li><li>One week I cheated and gave it a score of zero (the lowest score is supposed to be 1). I remember that week well without consulting my notes, and don’t regret using a zero, because it was awful. There were major layoffs at my work, and a lot of my friends and colleagues lost their jobs. These were folks I looked up to, were friends with, and worked with daily. Even though I was lucky enough to not lose my job, I felt depressed and angry. The work I loved and had been doing for nearly a year was not a priority any more for the company, which completely blindsided me. I temporarily lost my professional sense of purpose, and it took a long time to process my emotions and to channel them into something productive and to learn from the experience. Now that it is over, I cannot say that I would like to repeat the zero week, but there is a part of me that is grateful for it. It served as a catalyst for me to do a lot of personal and professional reflection, which ultimately resulted in me getting a new job.</li><li>Seven of the weeks that I logged had a score of 5! Looking back, I remember them clearly from my notes. They were weeks where I felt focused, I had a sense of direction at work, and ones where I was completing things that had concrete, visible results (e.g. fixing a bug, passing an interview and moving onto the next stage, making a program <em>finally</em> work after hours of trying.)</li><li>Most weeks were in the 3 range, with the occasional 4, which I feel is an accurate reflection of life — pretty good, doesn’t suck, but not AMAAAAAZING. If it were AMAAAAAZING all the time, I think it would be pretty exhausting.</li></ul><h4>Changes for 2019</h4><p>I will most definitely be doing this again in 2019! In fact, I’ve already started! In 2019, I hope to increase the percentage of weeks that I log from 73% to 78%. I also hope to increase the completion of all “Three Specific Things” to at least 30%, but ideally more. In 2018, if a more pressing item came up, I did not replace it in my checklist. For 2019, I feel it would be appropriate to replace the occasional item to better reflect priorities, and plan to track how often I do that. Maybe that’s a great idea, maybe it’s not. No way to know but to try!</p><p>Overall, this was a huge success, for one big reason: I actually did it. Many of my self-improvement ideas get thrown out the window because they are not sustainable for one reason or another, but this one was perfect. It’s quick, it’s actionable, and the benefits far outweigh any minor inconveniences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50bccaab2174" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflections on Uber Tech Day 2018]]></title>
            <link>https://medium.com/@leah.e.cole/reflections-on-uber-tech-day-2018-8a953ba1a9ec?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a953ba1a9ec</guid>
            <category><![CDATA[autonomous-vehicles]]></category>
            <category><![CDATA[women-in-engineering]]></category>
            <category><![CDATA[uber]]></category>
            <category><![CDATA[diabetes]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Thu, 26 Apr 2018 18:21:16 GMT</pubDate>
            <atom:updated>2018-04-26T18:21:16.770Z</atom:updated>
            <content:encoded><![CDATA[<p>On April 19th, 2018 I attended Uber Tech Day 2018. I had such a great time and learned so many wonderful things that I decided to share some of my thoughts and notes from the day.</p><h3><strong>Why I Went</strong></h3><p>A good friend of mine sent me an invite to <a href="http://t.uber.com/techday2018">Uber Tech Day 2018</a> (thanks, <a href="https://medium.com/@talimarcus">Tali</a>!), an event sponsored by LadyEng, their women in engineering group. I decided to go for a number of reasons, some better than others</p><ul><li>It was hosted at a convenient time</li><li>It was free</li><li>It was easy to get to</li><li>It was an opportunity to learn more about a major consumer facing product (as opposed to the industrial products I see in <a href="https://medium.com/@leah.e.cole/the-newest-devangelist-1e31b520067a">my work at GE</a>)</li><li>It was an opportunity to see how Uber runs events and to see if any of their practices would work for Developer Relations events I am involved in</li></ul><h3>Who I Heard From and What I Learned from Their Speeches</h3><p>There were a number of incredible speakers throughout the day. The folks below were not the only speakers I heard, but they were the ones I had the most notes on, and therefore had more lasting takeaways that could be coherently written about than some of the other speakers.</p><h4><a href="http://www.cs.toronto.edu/~urtasun/">Raquel Urtasun</a></h4><p>Raquel is a researcher at University of Toronto and is also the head of <a href="https://www.uber.com/info/atg/">Uber ATG </a>in Toronto. <a href="https://www.wired.com/story/meet-the-woman-making-ubers-self-driving-cars-smarter-cheaper/">The goal of her research is to create scalable solutions for autonomous vehicles.</a></p><p>Dr. Urtasun introduced her talk with the two challenges that prevent scaling in the autonomous vehicle space:</p><ol><li>Cost of sensors</li></ol><p>Right now, the sensors that are on top of the self-driving cars and trucks you may have seen use <a href="https://oceanservice.noaa.gov/facts/lidar.html">LiDAR,</a> which I was familiar with from its use in other scientific discoveries (in particular, a <a href="https://news.nationalgeographic.com/2018/02/maya-laser-lidar-guatemala-pacunam/">recent discovery in Guatemala</a>.)</p><p><a href="https://www.wired.com/story/lidar-self-driving-cars-luminar-video/">What Is Lidar, Why Do Self-Driving Cars Need It, and Can It See Nerf Bullets?</a></p><p>LiDAR is super cool, but it is not the cheapest.</p><p>2. Cost to map the world</p><p>Dr. Urtasun claimed it would cost $2 billion dollars to map the world once — and that is not including the constant updates that would be needed to reflect our ever changing world. I do not know where that figure comes from, but if you think about what is required to map the world and the different possible ways you can do it (drones, satellites, cars with cameras, putting a camera on your cat and letting them run around the neighborhood…) it becomes apparent quickly how complicated and expensive this problem can get.</p><p>She continued to explain five areas that her team explores in order to improve the autonomous vehicle space:</p><ul><li>Perception — how do vehicles “see” the world around them? (LiDAR? Cameras? Other types of sensors?) Learning things like what is and is not a car is easy, but figuring out where one car ends and another car begins (differentiation) is a bit harder</li><li>Prediction — what are the objects around an autonomous vehicle (cars, cyclists, pedestrians, animals) going to do given the current context?</li><li>Planning + Control — what should the vehicle do based on the information it has?</li><li>Mapping — gathering information about the roadways to provide info to the vehicles</li><li>Localization — trying to figure out where the vehicle without using a map but instead using variables like the shape of the road, the speed limit, the position of the sun and the time of day, the intersection type</li></ul><p>It sounds like Dr. Urtasun and her teams at University of Toronto and at Uber ATG are definitely keeping busy, and I am very curious to see how things evolve as more and more discoveries are made.</p><h4><a href="https://www.theverge.com/2018/1/8/16862750/uber-elevate-flying-car-hire-tesla-battery-expert">Celina Mikolajczak</a></h4><p>Celina Mikolajczak is a super duper battery expert who came to Uber from Tesla in early 2018 to lead battery development for Uber Elevate, Uber’s flying taxi project. The goal currently is to start test flights for it in 2020, and to begin commercial flights in 2023.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJuWOUEFB_IQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJuWOUEFB_IQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJuWOUEFB_IQ%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/53d978431c56389c0823a2cb9ffc091c/href">https://medium.com/media/53d978431c56389c0823a2cb9ffc091c/href</a></iframe><p>Ms. Mikolajczak introduced her talk by talking about expanding urban transport into the third dimension stating that “infrastructure requirements are pretty modest.” This is an especially relevant statement in the Bay Area, where I live, and where <a href="http://www.sfweekly.com/topstories/will-we-ever-get-a-second-bart-tunnel-under-the-bay/">expanding BART has been plagued with infrastructure delays</a>. I am a self-described non-early-adopter with some mild to moderate skeptical tendencies, and I also had a wonderful internship years ago in the air traffic control space that left a major impression on me. This means that when Ms. Mikolajczak made this introduction, the next note in my notebook was, “GOOD LUCK.” Though skeptical about the entire concept, I was still eager to hear the rest, as this is a fascinating engineering problem.</p><p>These aircraft will need to take off and land vertically, but will travel horizontally. There are some aircraft that exist today that can do this (helicopters included) but none currently on the market meet all of the specifications Uber wants. They will be entirely electric, which is where Ms. Mikolajczak’s battery expertise comes in. These aircraft will only be taking trips in urban areas between “skyports” and these trips will always be less than 60 miles — this is lower than the range of a typical Tesla today. However, the energy costs of the vertical takeoff and landing are rather expensive, and batteries today, while close, are not quite at the capacity needed. The intent is that Uber Elevate aircraft will be charged while they are loading and unloading, as well as when not in use. Right now, the best Tesla battery can be recharged fully in about 45 minutes. The goal for these aircraft is to have those batteries be charged to full capacity in 15 minutes. Today’s battery technology cannot be charged that quickly, but it sounds like it is well on its way.</p><p>Ms. Mikolajczak is not tackling this problem alone — she is part of a team of many experts, including folks who have 20+ years of experience at NASA, in the US Military, and in the fields of air traffic control and acoustics. They know what scientific, political, and regulatory challenges stand in their way. They are also <a href="http://www.businessinsider.com/companies-working-with-uber-on-elevate-flying-taxi-2017-4#bell-helicopter-based-in-forth-worth-one-of-uber-elevates-partner-cities-the-company-manufactures-vertical-lift-off-aircrafts-for-the-military-it-specializes-in-tiltrotor-aircrafts-4">partnering with a number of companies</a> with expertise to develop the aircraft itself.</p><p>While I am still not an early adopter and am a huge skeptic about most things, but the end of this talk, I definitely transitioned from, “GOOD LUCK,” to “Well, if anyone can do it, these folks can,” and I am eager to see what they achieve.</p><h4><a href="https://www.socos.me/vivienne">Vivienne Ming</a></h4><p>When Dr. Vivienne Ming first walked onstage, I knew she looked familiar, but I could not figure out why. Finally, it hit me — years ago, I had read <a href="https://www.huffingtonpost.com/2013/10/12/vivienne-ming-self-discovery-gender-transition_n_3998281.html">an excellent Huffington Post article</a> about Dr. Ming’s unique perspective on being a woman in tech. However, I was sorry to realize that I recalled very little about her actual work, and challenged myself to pay extra attention as a result. It turned out that paying extra attention was no challenge, though, because hearing Dr. Ming speak about her work is captivating. She shared a number of anecdotes, but the most poignant was about the experimenting she has done on her own son.</p><p>A few years ago, Dr. Ming’s 6-year-old son was diagnosed with Type 1 diabetes. Since Dr. Ming and her wife are both scientists, they decided to collect as much data as possible from their son. They not only monitored his blood glucose levels, but also monitored every other aspect of his life (what he ate, how he slept, daily activities, emotions) and kept track of it on a Google Doc. When they proudly showed up to their son’s next doctor’s appointment with a stack of papers in hand, they were shocked when the doctor was not excited by the amount of information they had collected. In fact, Dr. Ming says the medical staff was even annoyed at the one inch stack of papers she had brought in, citing it as unnecessary.</p><p>Dr. Ming left the appointment feeling, “well, if they don’t want the data, I will just figure this out myself!” And <a href="https://www.aspenideas.org/blog/i-built-superpower-treat-my-sons-diabetes-1">she did</a>. Dr. Ming put a basic smartwatch on her son and continued to monitor all of the data points she had been monitoring previously, and routed all of the data to her private server. She fit this data to a mathematical model that could correctly predict when his blood glucose levels were going to be outside of normal thresholds, and wrote a program to send alerts to a <a href="https://en.wikipedia.org/wiki/Google_Glass">Google Glass</a> that she wore. She later donated this code to <a href="https://tidepool.org/">Tidepool,</a> which is an open-source not-for-profit company focused on making diabetes data more accessible.</p><p>Not only is this research incredible, but I found the reasons behind it to be so simple and so pure. Dr. Ming did not begin this because she woke up one day and decided she wanted to make life easier for folks with diabetes, she began this because she is a mom, and she wanted to help her son. Her passion is inspiring and she is proof that passion, hard work, and resourcefulness can solve problems that make the world a better place!</p><p>Dr. Ming has even more research that I won’t discuss here, but if you want to learn more about what she works on, check out <a href="https://www.socos.me/home">Socos Labs</a>, which she (and her wife, Dr. Norma Ming) co-founded to “explore the future of human potential.”</p><h4>Other Speakers</h4><p>I heard from a number of other speakers from Uber throughout the day, who left me with the following random tidbits from their speeches:</p><ul><li>“If you aren’t planting the seeds for 5–10 years out, then you have no company in 5–10 years” —<a href="https://en.wikipedia.org/wiki/The_Innovator%27s_Dilemma"><em>The Innovators Dilemma</em></a></li><li>Context and perspective are crucial in UX. Focus on market fit and also on empathy — you are building for humans, so do your homework to understand them.</li><li>One week of traffic data at Uber is about 1TB. This is about the same amount of data that a single jet engine creates in a cross country flight. Consumer data and industrial data really operate on different scales!</li><li>My algorithms teacher was right —<a href="https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm"> Djikstra’s algorithm</a> is pretty important. Not too much of a surprise given its purpose, but it plays a crucial role in solving the routing problem for Uber.</li></ul><h3>Conclusion</h3><p>This day far exceeded my expectations. I came in expecting to hear some interesting technical talks, but did not expect to walk away feeling so inspired that I wanted to write about it and share everything I learned with the world. Thank you, LadyEng and Uber, for putting on such a spectacular event.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a953ba1a9ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developers, Digital Transformation, and Dumplings…]]></title>
            <link>https://medium.com/@leah.e.cole/developers-digital-transformation-and-dumplings-6de5f38ec7f5?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6de5f38ec7f5</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[developer-evangelism]]></category>
            <category><![CDATA[industrial-internet]]></category>
            <category><![CDATA[predix]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Wed, 13 Dec 2017 19:40:51 GMT</pubDate>
            <atom:updated>2017-12-13T19:40:51.846Z</atom:updated>
            <content:encoded><![CDATA[<p>…the key components to success at the GE Digital Industrial Transformation Summit in Shanghai, China. Well, maybe the dumplings were just an added bonus, but I would certainly recommend them to anyone visiting Shanghai.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jv5Q62srGSo3AqFeLd8Qfg.jpeg" /><figcaption>With my new dumpling friend at Din Tai Fung in Shanghai</figcaption></figure><p><strong>Day 0: The Pre-Event</strong></p><p>After a breakfast that of course, included dumplings, and a day of exploring Shanghai and attempting to conquer some serious jet lag, my colleague <a href="https://forum.predix.io/users/130/turnerth.html">Tom Turner</a> and I headed to the office for our first day at the <a href="https://www.ge.com/digital/ge-digital-industrial-foundries">GE Digital Shanghai foundry</a>. We met our superstar colleagues Peng Xia and <a href="https://forum.predix.io/users/1684/eagletang.html">Eagle Tang</a>, who run the Dev Ecosystem team based in China. Peng and Eagle gave us an introduction to their work and the offerings of the Digital Foundry, and then dove into the specifics of the upcoming event: the GE Digital Industrial Transformation summit. Later in the day, we met up with 20–30 local engineers from the Shanghai site for a meeting with a couple of our executives, Eddie Amos and Patrick Franklin, to talk about Predix, APM, Field Services, and the overall apps-led strategy of GE Digital. Eddie and Patrick each gave a short speech, and then left a lot of time for Q&amp;A. Being part of a global company, I was curious to see if the questions asked by engineers in China were going to be similar to questions I’d heard asked at meetings in the USA. Overall, they were, but there were a few differences, mainly regarding networks. As you may know, China has strict laws regarding data governance and networking, which lead to different engineering problems and considerations than ones we see in the US and other countries.</p><p><strong>Day 1: The Main Event</strong></p><p>This event was hosted at our Digital Foundry that offers a space and events that all fall under journeys for three different personas: Customers, Developers, and Engineers. At the Digital Transformation Summit, the focus was primarily on Customer and Developer Journeys. For all attendees, there was a morning plenary session. GE leaders from China and the US spoke about Digital Transformation, especially as it relates to the China economy. Unfortunately for me (but fortunately for pretty much everyone else) the plenary was predominantly spoken in Chinese, so I did not understand much of it. What I did understand was the impact and interest that the speakers drew from their audience. The hall where the plenary was held was filled, and many people were crowded around the screens where the speeches were being live-streamed. The lobby of the office also featured impressive booths for all attendees to visit, including a booth with a subsea mining drill, one with an ultrasound machine and a Neonatal Intensive Care Unit bed, and another with a jet engine model that seemed pretty close to full-size to me. This jet engine was used as part of an incredible Predix demo featuring augmented reality technology, which I’ll explain a little bit later on. After the plenary, the day had multiple breakout sessions for various audiences, and a Predix Certification session, led by Susan Kim from the Predix Training team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*510B5GFBv0AbWoGOsXAovw.jpeg" /><figcaption>Agenda for breakout sessions</figcaption></figure><p>I had the honor of being the kickoff speaker for the Predix breakout session. As part of my talk, I gave an overview and introduction to the Predix Platform. I detailed the concept of a Digital Twin, explained how Predix and Digital Twin fit into our Apps-led strategy, and introduced some of the more exciting things our team is leading IIoT Apps and Predix world, including the Machine Workshop and the <a href="https://www.ge.com/digital/iiot-for-developers-ebook">new book</a> written by my fellow Developer Evangelist <a href="https://forum.predix.io/users/1547/ryanebohm.html">Ryane Bohm</a>. I also left a lot of time for Q&amp;A; to be honest, the Q&amp;A was what I was most excited for. The audience was a unique one for me — not only did it consist of customers, engineers, AND <a href="https://www.predix.io/blog/article.html?name=citizen-developers-are-building-iiot-apps-low-code&amp;article_id=2515">Citizen Developers</a>, but these audience members are also all part of the China IIoT market, which is very new to me. What would they ask? It turns out that their questions were similar to what I had heard at Minds + Machines conference in San Francisco a few weeks prior. The audience wanted more about the Edge and about Digital Twin. One difference though was that the audience wanted to hear a lot about the Predix Private Cloud which is a Predix offering where Predix is running on-premise at a site. While it was a question I don’t hear as much in the US, it was not surprising given China’s strict data governance laws and culture around data privacy and protection. The breakout sessions continued throughout the day, where local developers detailed Predix Data Services, Security, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gUaAHZ9_1ebnsWEMQsUUA.jpeg" /><figcaption>Delivering the Predix overview breakout session</figcaption></figure><p>Concurrently, 20 people sat in a funky room upstairs attending the Machine Workshop, similar to the Machine Shop we ran at Minds and Machines. Now, let me tell you, this room was incredibly cool. It had walls covered in Predix and Digital Transformation related artwork, and one wall had faux airplane windows. And a pyramid of <a href="https://www.predix.io/blog/article.html?name=predix-developer-kit-connect-and-start-building&amp;article_id=2542">Predix Developer Kit</a> boxes stood proudly at the front of the room with their unpacked contents stationed on tables throughout the room. What was most cool, though, was watching the attendees grin each time they completed a step in the Workshop, completing the various stages of their respective Edge to Cloud journeys. During the Machine Workshop, attendees first worked to connect to their Edge Device (an Intel NUC) and to add a sensor to it. They then connected their Edge devices to the cloud and saw their data stream into Predix. Local engineers, Tom and I all were on call in case any attendees ran into difficulties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFZuV0rKsNuu2D9C_C1c3A.jpeg" /><figcaption>Engineers at the Machine Workshop</figcaption></figure><p>Peng, Eagle, Tom and I later joined two meetings in the afternoon. One meeting was with <a href="https://en.wikipedia.org/wiki/CSDN">CSDN</a>, which is the China Software Developer Network. CSDN is incredible — it is like StackOverflow, Coursera, and a coding academy (and honestly probably more) all rolled into one neat online package. It is the largest developer community in China, with 26 MILLION unique MONTHLY users. In China, this is where the <a href="http://predix.csdn.net/">online Predix Community</a> lives. We had a fascinating discussion with its founder where we learned about the audience on CSDN (30% students,70% full time developers), statistics about things like what language Chinese developers use, what languages they want to learn, and more. A lot of those statistics were similar to the US, but there were some differences. For example, there is no China instance of GitHub, so a lot of CSDN developers use other forms of version control. Cloud computing is also not as popular in China as it is in the US due to the data restrictions. I expect that these statistics will change in the next few years.</p><p>The second meeting was with the winners of the “Predix Spark” competition. The Predix Spark competition ran in China from September-November with the goals of growing the Predix developer community and incubate Industrial applications developed by China ecosystem partners and customers. The winners received Predix certification and training vouchers, Predix resources, solution development and incubation in the foundry, and other business opportunities from GE. The winners we met with built a super interesting remote repair application using Predix. Tom and I had the chance to try the application, which involved trying on a <a href="https://www.microsoft.com/en-us/hololens">Hololens</a> and “examining” a jet engine that needed repair. In this app, everything we were seeing was being transmitted to a remote technician, who sat in another room. The tech and the Hololens wearer were able to communicate within the application and to diagnose the problem after examining the engine. While wearing the Hololens made me a little dizzy, it also made me incredibly excited at the kinds of problems augmented reality can solve in the IIoT space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wv1Jq_0hL6PnwVmtY1FBOQ.jpeg" /><figcaption>My colleague Susan tries out the hololens demo</figcaption></figure><p>In conclusion, my experience at the GE Digital Industrial Transformation Summit in Shanghai was incredibly rewarding, and not just because dumplings were involved in at least two meals every day. It was enlightening to meet customers from the GE China ecosystem, to tell them about Predix, and to answer their questions and better understand their use cases. It was enthralling to watch attendees take their first steps from Edge to Cloud as part of the Machine Workshop. It was thought-provoking to meet with CSDN and the Predix Spark winners — to see firsthand how developers in China are using Predix to build the future of IIoT. I am grateful to Peng Xia and Eagle Tang for making it possible for me to attend, and I cannot wait to see all of the amazing things that are sure to come out of the GE China Ecosystem.</p><p><em>Originally published at </em><a href="https://www.predix.io/blog/article.html?name=chinese-developers-get-busy-predix-and-iiot-app-development&amp;article_id=2550"><em>www.predix.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6de5f38ec7f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The newest Devangelist]]></title>
            <link>https://medium.com/@leah.e.cole/the-newest-devangelist-1e31b520067a?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e31b520067a</guid>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Tue, 12 Sep 2017 16:04:13 GMT</pubDate>
            <atom:updated>2017-09-12T16:04:13.958Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been a jack of all trades for as long as I remember. My extracurriculars in high school had nothing to do with my favorite academics. My studies at Carleton — a liberal arts college that was a perfect place for a jack of all trades like me to learn and grow — focused mainly on Computer Science, but with a heavy side dose of German courses. When I graduated, I ended up joining the <a href="https://www.ge.com/careers/working-at-ge/digital-technology-leadership-program">Digital Technology Leadership Program</a> at GE because it offered six month rotations that focused not only on developing me technically, but also on developing my skills as a leader. It was a perfect match — I was valued for my technical side, I was valued for my people skills, AND I got more time to figure out what exactly it was that I loved about tech.</p><p>When I began the program, I expected that after two years something would emerge as the front-runner — I’d know exactly what I wanted to do at the end. I spent my rotations in widely varying roles hoping to increase my chances of finding that one, perfect job for me — I learned Agile best practices as a programmer for our <a href="https://www.ge.com/digital/asset-performance-management">Asset Performance Management</a> product, I worked with incredibly interesting customer data used by <a href="https://www.geaviation.com/digital">GE Aviation</a>, I gained hands-on customer experience in <a href="https://www.ge.com/digital/services/professional-services-iiot">Professional Services</a>, and put it all together while working in <a href="https://www.ge.com/digital/brilliant-manufacturing">Brilliant Manufacturing</a>. After two years of learning incredibly cool stuff, when it was time for me to find that new, non-rotating role, I was greatly disappointed that the grand epiphany I had been hoping for hadn’t occurred. This turned out to be a blessing — I spent an incredible amount of time reflecting on my two years on program and was able to identify the following themes:</p><ul><li>The Industrial use cases we have at GE are SO COOL!</li><li>Industrial IoT is clearly our future, but we can’t get there without domain experts from the industrial side and the software side working together</li><li>Predix has come a long way since I first started, but still has room for growth</li><li>I am excellent at Wizard of Oz Pinball</li></ul><p>I joined the Developer Relations organization as a Devangelist for all of the reasons above (well, three of the four). I am excited to work to see that Predix is understood by all who are technical and by those who aren’t. I am excited to work with domain experts in the various GE Business Units to figure out how to make Predix consumable for citizen developers, and to develop the content to make that happen. As a Devangelist I will get to do all of those things and more — a perfect fit for this jack of all trades.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sh1IgITpt2TBNipTvktKmQ.jpeg" /><figcaption>At the Predix Transform Hackathon, 2016</figcaption></figure><p><em>Originally featured 8/24 on </em><a href="https://www.predix.io/blog/article.html?article_id=2465"><em>Predix.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e31b520067a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How-To Use Python to Remove or Modify Empty Values in a CSV Dataset]]></title>
            <link>https://code.likeagirl.io/how-to-use-python-to-remove-or-modify-empty-values-in-a-csv-dataset-34426c816347?source=rss-d28c3589047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/34426c816347</guid>
            <category><![CDATA[codelikeagirl]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Leah Cole]]></dc:creator>
            <pubDate>Wed, 23 Aug 2017 20:32:22 GMT</pubDate>
            <atom:updated>2018-02-19T01:33:58.468Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SDpPEfzaB1bkmPjuGZ8yVA.jpeg" /></figure><h3>The Problem</h3><p>Data sets are not perfect. Sometimes they end up with invalid, corrupt, or missing values. For the project I was working on, I could not have any values that were null or empty. This How-To will walk you through writing a simple Python script to see if your data set has null or empty values, and if so, it will propose two options for how to modify your data.</p><h4>Example</h4><p>This simple data set shows you a flight and tells you its airline, flight number, and the reason it was cancelled. However, if a flight wasn’t cancelled, it will have no cancelled reason, and therefore has a null/empty value.</p><p><strong>Example of CSV missing data in excel </strong>— there is no “Cancelled Reason” for AwesomeAir flight 456:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*R6m5EZ0eYlhxGVsZohEdaA.png" /><figcaption>CSV with missing data displayed in excel</figcaption></figure><p><strong>Example of same CSV missing data in traditional comma-separated format </strong>— there is no “Cancelled Reason” for AwesomeAir flight 456:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*8fui_CPNf4XTnOYymLZBRA.png" /><figcaption>CSV with missing value</figcaption></figure><h3>Dependencies</h3><ul><li><a href="https://www.python.org/downloads/">Python</a></li><li><a href="https://pandas.pydata.org/pandas-docs/stable/install.html#installing-from-pypi">Python Data Analysis Library (Pandas)</a></li><li>A CSV dataset</li><li>Optional: <a href="https://ipython.org/">iPython</a> interactive shell</li></ul><h3>Disclaimers</h3><ul><li>This can significantly increase the size of your data set, because you are adding values to it. With large data sets, the pandas commands can take time.</li><li>These may not be the best solutions for your data. For more information on other ways to handle missing data with pandas, please refer to pandas’ guide on <a href="https://pandas.pydata.org/pandas-docs/stable/missing_data.html">handling missing data</a>.</li></ul><h3>Other Resources</h3><p>I used <a href="https://www.kaggle.com/usdot/flight-delays">this</a> kaggle data set to perform these operations, and it includes some more instructions on using Pandas and other Python libraries to explore your data.</p><h3>Steps</h3><p>The following steps can be written in a Python script and run at once, but I find it more interesting to explore in an interactive Python shell like <a href="https://ipython.org/">iPython</a>.</p><p>If you want to see what the scripts look like all together, please check out <a href="https://github.com/leahecole/pythonPandasRemoveModifyEmptyValues/blob/master/solution1.py">Solution 1</a> and <a href="https://github.com/leahecole/pythonPandasRemoveModifyEmptyValues/blob/master/solution2.py">Solution 2</a>. Otherwise, keep reading and follow along step by step.</p><ol><li>Import pandas import pandas as pd</li><li>Import csv into a Pandas <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html">DataFrame</a> object flights = pd.read_csv(&#39;flights.csv&#39;)</li><li>Check the shape of your data in (rows, columns) format flights.shape</li><li>(Optional) Check for all null values in your dataset. This will return a boolean stating if each cell is null. This can take a long time and may not be particularly useful in a very large dataset. flights.isnull()</li><li>Explore how many null values are in each column of your dataset flights.isnull().sum()</li><li>(Optional) Check how many null values are in a specific column, substituting the name of your column in string form where it says ‘col’ flights[col].isnull().sum()</li></ol><p>At this point, you will either <a href="https://github.com/leahecole/pythonPandasRemoveModifyEmptyValues/blob/master/README.md#sol1">replace your values with a space</a> or <a href="https://github.com/leahecole/pythonPandasRemoveModifyEmptyValues/blob/master/README.md#sol2">remove them entirely</a></p><h3>Solution 1: Replace empty/null values with a space</h3><ol><li>Fill all null or empty cells in your original DataFrame with an empty space and set that to a new DataFrame variable, here, called ‘modifiedFlights’*. modifiedFlights=flights.fillna(“ “)</li><li>Verify that you no longer have any null values by running modifiedFlights.isnull().sum()</li><li>Save your modified dataset to a new CSV, replacing ‘modifiedFlights.csv’ with whatever you would like to name your new file. modifiedFlights.to_csv(&#39;modifiedFlights.csv&#39;,index=False)</li></ol><ul><li>If you wish, you can replace your original DataFrame, using flights=flights.fillna(&quot; &quot;)</li></ul><h3>Solution 2: Remove rows with empty values</h3><ol><li>If there are only a few null values and you know that deleting values will not cause adverse effects on your result, remove them from your DataFrame and store that in a new DataFrame* modifiedFlights = flights.dropna()</li><li>Verify that you no longer have any null values by running modifiedFlights.isnull().sum()</li><li>Save your modified dataset to a new CSV, replacing ‘modifiedFlights.csv’ with whatever you would like to name your new file. modifiedFlights.to_csv(&#39;modifiedFlights.csv&#39;,index=False)</li></ol><p>*If you wish, you can replace your original DataFrame, using flights=flights.dropna()</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34426c816347" width="1" height="1" alt=""><hr><p><a href="https://code.likeagirl.io/how-to-use-python-to-remove-or-modify-empty-values-in-a-csv-dataset-34426c816347">How-To Use Python to Remove or Modify Empty Values in a CSV Dataset</a> was originally published in <a href="https://code.likeagirl.io/">Code Like A Girl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>