Screen Link:
https://app.dataquest.io/m/356/guided-project%3A-exploring-hacker-news-posts/4/calculating-the-average-number-of-comments-for-ask-hn-and-show-hn-posts
This shows your first five rows in the
ask_posts
list of lists
This is my first five rows in the
ask_posts
list of lists
Observation: Yours shows not just the title but the other features. Mine shows the title(ask_posts).
Question: Why the different. Our aims is to extract the Ask HN and Show HN of which we did. So why is my output different from yours.
You will have to share your code that prints that output, otherwise we can’t be sure of what you did differently.
These are the instructions for that Step -
Implement the following steps:
- If the lowercase version of
title
starts with ask hn
, append the row to ask_posts
.
- Else if the lowercase version of
title
starts with show hn
, append the row to show_posts
.
- Else append to
other_posts
.
You are required to append the row
, and not the title
. When you append the row
to the right list depending on the if
condition, you should get the same output as theirs.
Thank You. I have implemented the correction and my code is working perfectly fine
1 Like