Lecture 11¶
Announcements and Updates¶
SQL stuff
Test 4 grades back soon
Plan for today
Outline¶
debugging python and pandas
working on cross-platform projects
resolving git problems
complex data cleaning and wrangling challenges
creating effective dashboards
1. Debugging python and pandas¶
## Goal is to create write two nested functions that do some math
def math1(x,y,flag=True,):
if flag:
def math2(c,b):
y = y/0
return c-b
return math2(x,1)*y*5
else:
return (x*y)**2
2. Working on cross-platform projects¶
Careful about paths!
Use relative paths
Use
os.path.join
import os
os.getcwd()
'/home/runner/work/data301_course/data301_course/notes/week11'
os.chdir(os.path.join('..','..','Sync'))
os.getcwd()
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-5-a584e15d770c> in <module>
----> 1 os.chdir(os.path.join('..','..','Sync'))
2 os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory: '../../Sync'
3. Resolving git problems¶
Commits
Issues
Milestones
4. Complex Data Cleaning and Wrangling¶
5. Creating Effective Dashboards¶
Probably saved for next week