Homework 1 — Python Coding for Public PolicyPython

Java Python Homework 1 — Python Coding for Public Policy

Homework 1

Contents

Coding: Exploring Trends in How People Submit 311 Requests

Tutorials

Participation

General assignment information

Coding: Exploring Trends in How People Submit 311 Requests

Use this zipped copy of the cleaned data created in the lecture to complete the homework.

Read it in from:

https://storage.googleapis.com/python-public-policy2/data/311_requests_2018-19_sample_clean.csv.zip

You will get a DtypeWarning - donʼt worry about that for now.

# your code here

Step 0

Which complaint submission method ( Open Data Channel Type ) is used most frequently, according to this dataset? Provide the count of each for comparison.

# your code here

Step 1

Get the count of each submission method per complaint type, sorted by complaint type.

# your code here

Review the results and share a sentence or two with your observations.

YOUR RESPONSE HERE

Step 2

Provide a simplified table that only lists the most common request submission method for each Homework 1 — Python Coding for Public PolicyPython complaint type. There should be one row per complaint type, capturing the most common submission method for that complaint type.

# your code here

Can you provide a potential explaination for why some complaints are more frequently made via phone and mobile versus on the website?

YOUR RESPONSE HERE

Now turn in the assignment.

Tutorials

1. Read The Joys (and Woes) of the Craft of Software Engineering

Note not everything in there is applicable to data analysis

2. Filtering/indexing DataFrame. s

Filter specific rows from a DataFrame.

Boolean indexing

3. Learn about functions

Video

4. Coding Style. Guides - Please skim these; I donʼt expect you to understand and follow everything in them. The most important guidelines to pay attention to are indentation and keeping each statement on its own line.

The Hitchhikerʼs Guide to Python

PEP 8

5. Guide to commenting your code

6. Quartz Guide to Bad Data

Optional

Learn about data dictionaries

Glance through pandasʼ comparison with other tools for any you are familiar with

More on indexing:

How to Select Rows from Pandas DataFrame         

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值