Hi everyone, it’s me again!
In the last few L2D weeks we studied DataFrames. Now, I am not really sure what part of the course material DataFrames fall under BUT that doesn’t really matter much to me. What does matter is that, for the first time since starting L2D, I used the course material outside of the class!
Let me explain that in a bit more detail: during both DataFrames classes, we learned how to import our own data, manipulate it (at least to a certain degree), and how to plot it in a few different ways. As mentioned before, my PhD project is not the most computational, so learning about something that I might be able to use was very fun for me.
So, on my train ride, I decided I wanted to see if I would be able to plot my own (and first!) data using Python. Lo and behold, it took quite a while, and I am surprised I didn’t just give up halfway through. While the whole process is fairly logical during classes and in the reading material, once you are no longer explicitly following instructions, getting your code to do exactly what you want is quite hard.
And I ran into multiple errors. And bugs. And kernel deadlocks.
And closed the notebook quite a couple of times, highly annoyed that I could not figure out how to get the right axis labels on my graph. Or set the ticks to the right position. Or even import the data in the correct format.
But in the end, I managed to get the same graph as I did using Excel!!! And it was a very proud moment for me! Now, I must admit, I am currently unsure why I would go through the hassle of using Python when I get the same result using Excel BUT!!! I did go through a major high every time I successfully solved a problem. The moment I finally got the finished graph, I might have jumped out of my chair.
Learning to code really is a rollercoaster but having those small (or rather big!) successes really makes the whole experience worth it! Well, at least that is my opinion after a pretty positive coding moment – let’s see what happens when I get to the next challenge! That being said: please enjoy my code and graph, complete with all my little annotations that very clearly show that sometimes, I do not even know why I enter a certain line of code, I just steal it from the course material and live classes.
Merry Christmas or Happy Holidays to everyone!
Written by Helena Friedrich, edited by the Learn To Discover Team.