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”
Author Archives: isaacgaz
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”
Python Day 46 – more SQL
Today I continued working on SQL… I learned: To count up certain values or the number of variables in a column, one can use COUNT(*), and attach “AS new_category_name” to create a new category with the count! This was useful in the example data of Nobel laureates to count how many prizes each country won.Continue reading “Python Day 46 – more SQL”
Python Day 45 – progress on SQL!
Today I didn’t think I’d get much done but I actually felt like I understood the bare basics of SQL! I learned: Use * to select all columns from the data. To use a pandas dataframe use the .read_sql() function. I also learned the basics of SELECT, FROM, and conditional statements (for instance how toContinue reading “Python Day 45 – progress on SQL!”
Python Day 44 – intro to databases
Happy 2022! Today I briefly went over databases and learned that SQL is a language that allows us to communicate with relational databases. I didn’t get far today cause I’m spending time with the family but that’s that for now!
Python Day 43 – pandas indexes and augmented assignment
Technically I finished the Pandas module today although I’m learning more and more that there’s a lot I have yet to understand about Pandas hah. I learned: You can .set_index(“column name”) of a dataset so the index number becomes any column you choose. Augmented assignments are a more efficient way of formatting code (usually byContinue reading “Python Day 43 – pandas indexes and augmented assignment”
