Due to the complex nature of functions, on April 1, we started with a review of functions with the following problem: We then introduced classes and methods: Classes: Python is an “object-oriented programming language.” This means that almost all the code is implemented using a special construct called classes. Programmers use classes to keep related things […]
Category: Uncategorized
Python Open Lab: Week 4
On March 5, we built on the lesson from week 3, and reviewed functions. Here is one of the problems you can try: The full jupyter notebook is available for this lesson. Please comment, or send us an email and we can make this lesson (or any other lesson from the semester) available to you! […]
Python Open Lab Week 3: Feb 26
For week three we decided to tackle strings, string methods, and functions: String Methods Strings are amongst the most popular types in Python. We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable. The […]
Python Open Lab Feb 19
On week two of the open labs, we continued building on the starter kit and worked on python data structures. We discussed loops (both for and while), dictionaries and dictionary methods. A while loop is a concept that, when implemented, executes a piece of code over and over again, while a given condition remains true: […]
Highlights from the Data Collection: U.S. Election Data
The Libraries Numeric Data Catalog Holdings has some interesting data on the United States election results starting from 1912 to the most recent election year. Included are data on not only the presidential elections, but also gubernatorial, senatorial, congressional, and special senatorial elections. The source of the data is Dave Leip’s Atlas of U.S. Presidential […]
Python Open Lab Nov 28: Blog Style!
Hello all, Due to some complex scheduling issues, I am posting here the material we would have covered in lab tomorrow. Please feel free to contact me for any questions (data@library.columbia.edu). Enjoy! Python Objects and Classes (cont’d!) Self: What is the self variable in Python? The self variable represents the instance of the object itself. Unlike most object-oriented languages […]
Fall 2017 Python Open Lab Week 3
October 10, 2017 Week 3’s lab was intense! We started with list methods, where we left off last week and went through the following: list.append(x): Add an item to the end of the list. list.extend(L): Extend the list by appending all the items in the given […]
Fall 2017 Python Open Lab Week 2
Week 2: October 3rd This week we started with a brief review of the basics from week 1 and the starter kit. We continued on with Data Structures and worked through Lists, Tuples and Dictionaries. These concepts were easy to approach and we went over many practice examples on the way. Towards the end of […]
Fall 2017 Python Open Lab Week 1
Week 1 September 26 In week 1 of our Python Open lab, we introduced the Python Starter Kit and went over Python basics such as expressions, variables and statements, floats, statements, integers, strings, booleans, and control flow statements. The class was a mix of students with little to no experience with Python, to a few […]
R Open Lab Materials
For better reproducibility and accessibility, I created a GitHub repository (https://github.com/yuejin123/ROpenLab) to put the instruction materials I used for all the R Open Lab session in the past academic year. Again, thank you to all who came to the R Open Lab. ☀️Enjoy the summer!☀️ […]