Today I did some more regex crosswords. Still couldn’t figure out the one that stumped me yesterday, although I managed to do a few more until I reached this one which is currently stumping me: So then I moved on into this worksheet for wrangling time series data… I learned: To import datetime. The basicContinue reading “Python Day 56 – regex and datetime”
Category Archives: Python Learning
Python Day 55 – regex crosswords
At first I thought the regex crosswords problems were way too hard. I had no idea what was going on, but for some reason I kept getting them right. I then realized that it was much simpler than I thought and I was actually thinking about them correctly. I subsequently realized I was doing theContinue reading “Python Day 55 – regex crosswords”
Python Day 54 – intro to regex
Went through some tutorials for regex today… I learned: \d can be used to replace any digit from 0 to 9 . is a wildcard To use normal period. use \. To specify characters use [] ex: [abc]an To match any value that starts with a or b or c, and ends in βanβ ToContinue reading “Python Day 54 – intro to regex”
Python Day 53 – Pandas array operators
Update from yesterday’s problem: to take the mean one simply needs to call which column first, for instance data[‘column_name’].mean(). Today… I learned: How to use basic string operators in arrays with pandas. I learned that one just needs to specify a column, and the add the .str attribute to whatever operation they want to do.Continue reading “Python Day 53 – Pandas array operators”
Python Day 52 – importing data into Pandas
Again, it took literally 2 seconds of me looking at my problem of the data not importing from yesterday to realize my mistake… if only all of life’s answers could become clear upon one night’s sleep. I learned: THAT ONE NEEDS TO PUT “foldername/data.csv” WHEN READING A CSV FILE WITH PANDAS. THIS WAS LITERALLY WRITTENContinue reading “Python Day 52 – importing data into Pandas”
Python Day 51 – formatting .txt in Pandas
Success! In a matter of minutes I solved the problem that was vexing me yesterday. I sense a pattern here… yay for a fresh mind. I learned: When getting data from a .txt file, one can still use the pd.read_csv function. The issue I was running into yesterday was that it was reading the columnContinue reading “Python Day 51 – formatting .txt in Pandas”
Python Day 50 – Pandas practice problems
Today I practiced importing various data into Python with Pandas, and looking at it in different ways. I learned: To use the pd.read_csv(“folder/data_name.csv”) command to define a dataset from an outside source. And then use .sort_values(by = ‘category’, ascending = False) to sort the values however I wish. Also to chart data, use the df3.plot(xContinue reading “Python Day 50 – Pandas practice problems”
Python Day 49 – finishing my SQL practice problems
It took me less than 2 minutes from sitting down at my computer to solve the practice problem that had completely stumped me yesterday. I guess time does heal all wounds :’) I learned: In general in SQL, but especially when joining two tables, the ordering of commands matters. The main issues I was runningContinue reading “Python Day 49 – finishing my SQL practice problems”
Python Day 48 – the roller coaster of SQL
I started off the day very frustrated. The smallest syntax errors were messing me up. I learned the hard way to always put a comma after SELECTing a category in SQL, and to make sure to put a backslash if I’m separating lines. After these initial frustrations I was almost ready to put the computerContinue reading “Python Day 48 – the roller coaster of SQL”
Python Day 47 – oof
Today was a day of frustration. Mostly conceptual frustration. Before we get to that though. I did learn some stuff… I learned: In SQLite one can ORDER BY category_name DESC to order the data by that category. One can also JOIN tables together. There are three types of joining: INNER JOIN, LEFT JOIN, and OUTERContinue reading “Python Day 47 – oof”
