# Data I/O and Preprocessing with Python and SQL (Instructor - Sean Barnes)

**URL:** <https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875>\
**Category:** Data I/O and Processing with Python and SQL\
**Tags:** week-module-2, dl-ai-learning-platform\
**Created:** [December 11, 2025, 7:25pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875 "2025-12-11T19:25:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeepaNZ](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@DeepaNZ](https://community.deeplearning.ai/u/DeepaNZ)\
**Post date:** [December 11, 2025, 7:25pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/1 "2025-12-11T19:25:09Z")

</div>

Kia Ora!

I am starting this as a new post as I didn’t receive any resolution. I am having trouble with final exercise I do so far, throwing 401 error. If it’s right, kindly share the fix you found. And I have tried accessing the url - [https://2eraiuh.dlai.link/api/UScensus](https://2eraiuh.dlai.link/api/UScensus) which throws the same access issue.

Kindly give me the access.

Thank you,

Deepa

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [December 11, 2025, 7:59pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/2 "2025-12-11T19:59:06Z")

</div>

Hi! Can you send me your notebook via direct message so we can confirm? The lab is working fine on my end. You can click my name then the blue Message button. Thanks!

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [December 16, 2025, 2:06am UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/3 "2025-12-16T02:06:48Z")

</div>

For other learners who may run into the same issue: There was a problem with the solution. You can refer to the practice labs and hints within the notebook to guide you towards the correct code. Hope this helps!

---

<div class="post-metadata">

**Author:** ![Grigori\_Azaryants](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/grigori_azaryants/32/146953_2.png) [@Grigori\_Azaryants](https://community.deeplearning.ai/u/Grigori_Azaryants)\
**Post date:** [August 6, 2026, 1:36pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/4 "2026-08-06T13:36:09Z")

</div>

Hello,

I’ve got the similar problem.

I’ve executed the following steps:

1. Restarted the notebook kernel.

2. Ran every cell from the beginning in order.

3. I confirm that I have not modified any provided helper-code cells.

4. Saved the notebook before running the tests and submitting again.

But the problem is still with me.

I’m unable to pass the grader for Module 2’s graded lab, despite extensive manual verification that my code and output are correct. Details below:

**Exercise 3** (convert columns to numeric):

- Error: “The following columns in census\_df\_clean do not have the correct type”
- I verified: all listed columns show as `int64` (also tried `float64`) via `.dtypes`, with no NaN or inf values.
- Tried: `pd.to_numeric()`, explicit `.astype(float)`, full kernel restart + run all + save before each grading attempt.

**Exercise 5** (poverty rate calculations):

- Error: “The values in the column ‘total\_poverty\_rate’/‘under\_5\_poverty\_rate’/‘over\_75\_poverty\_rate’ do not match the expected values”
- I verified: the first 5 rows of my output match the expected output screenshot in the assignment **exactly** (e.g., 0.096262, 0.175305, 0.043644 for row 0).
- Full dataset checked: no NaN, no inf, 826 rows, clean monotonic index starting at 0.

**Exercise 6** (vulnerability score):

- After fixing a naming confusion (used `under_5_poverty_rate` instead of the correct `under_5_poverty_proportion` per the formula in the directions), the histogram now visually matches the expected output shape.

**Exercise 8** (z-score outliers):

- Error: “The values in the column ‘z\_score’ do not match the expected values”
- I compared standard ddof=1 (`.std()`) vs ddof=0 (`scipy.stats.zscore`) against a provided expected-output screenshot — ddof=1 (Pandas default `.std()`) gives near-exact matches (differences ~0.0006%), but the grader still fails.

**Troubleshooting already performed** (multiple times, per support’s suggestion):

- Kernel → Restart & Run All, in order, from the first cell.
- Saved the notebook (Ctrl+S) both before and after running all cells, and again before each grading attempt.
- Confirmed no provided/locked helper-code cells were modified.
- Checked for duplicate `# GRADED CELL` markers — none found.

Given that the computed values visually and numerically match the expected outputs shown in the assignment instructions, I suspect this may be a grader-side issue (e.g., stale reference data, or a mismatch in the grader’s expected dtype) rather than an error in my code. Screenshots of the grader feedback and expected outputs are attached.

Could someone review the grading script for these specific exercises, or confirm the exact expected dtype/computation method?

Thank you,  
Grigori Azaryants

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [August 6, 2026, 6:39pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/5 "2026-08-06T18:39:10Z")

</div>

It’s better to start a new thread, rather than add a reply to a thread that has been cold for 8 months.

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [August 6, 2026, 10:33pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/6 "2026-08-06T22:33:05Z")

</div>

Hi! Please do create a new topic as Tom suggested. With that, please also send me your notebook via direct message. You can click my name then the blue message button. Closing this topic now because the original issue was solved. Thanks!

---

<div class="post-metadata">

**Author:** ![chris.favila](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/chris.favila/32/126338_2.png) [@chris.favila](https://community.deeplearning.ai/u/chris.favila)\
**Post date:** [August 6, 2026, 10:33pm UTC](https://community.deeplearning.ai/t/data-i-o-and-preprocessing-with-python-and-sql-instructor-sean-barnes/884875/7 "2026-08-06T22:33:13Z")

</div>


