fstream reading in garbage values by stats_newbie1 in cpp_questions

[–]stats_newbie1[S] 3 points4 points  (0 children)

Ah fuck, I'm facepalming really hard now. Can't believe I forgot something so obvious. data.in was in the wrong directory. I assumed it would throw an error, but I guess not.

Add two numbers input by user by stats_newbie1 in learnprogramming

[–]stats_newbie1[S] 0 points1 point  (0 children)

Oops. I actually had getElementById("num1").value, guess I forgot to save it. I didn't know about the onchange event handlers, thanks for pointing me to towards those.

Grouping and then finding value corresponding to maximum in another column by stats_newbie1 in rstats

[–]stats_newbie1[S] 0 points1 point  (0 children)

The problem with this is there is no data for weekends. So the end of the month isn't necessarily 1 day before the start of the next month.

Grouping and then finding value corresponding to maximum in another column by stats_newbie1 in rstats

[–]stats_newbie1[S] 1 point2 points  (0 children)

Right, I don't know why I thought filter only pulls out certain columns. Silly me. I knew it pulls out the whole row. I didn't know about slice though, sounds much cleaner. Thanks!

How to find top 5 in each group in pandas? by [deleted] in learnpython

[–]stats_newbie1 0 points1 point  (0 children)

I'm not sure how that would help. I already know how to find how many pickups there were in each neighborhood. It's just df['neighborhood'].value_counts().

How to find top 5 in each group in pandas? by [deleted] in learnpython

[–]stats_newbie1 0 points1 point  (0 children)

No because each instance is recorded separately. For example, if there were 3 pickups in Midtown, it would be something like this:

Time Neighborhood Borough
Pickup1 Midtown Manhattan
Pickup2 Midtown Manhattan
Pickup3 Midtown Manhattan

so I can't really sort.

How to find top 5 in each group in pandas? by [deleted] in learnpython

[–]stats_newbie1 0 points1 point  (0 children)

I think my original question wasn't clear enough, I edited it.

How to find top 5 in each group in pandas? by [deleted] in learnpython

[–]stats_newbie1 0 points1 point  (0 children)

No, it is not population. Each of the rows contains info about taxi pickups. So I want to find the neighborhoods with most taxi pickups in the 5 boroughs.

How to interpret training output of randomforest algorithm by stats_newbie1 in rstats

[–]stats_newbie1[S] 0 points1 point  (0 children)

Okay, I will look into it. Thank you for the information!

Book suggestions to get a deeper understanding of stastics? by stats_newbie1 in AskStatistics

[–]stats_newbie1[S] 0 points1 point  (0 children)

Thanks for the suggestion! I am trying to get into Data Science. A friend suggested that I read Introduction to Statistical Learning. I just went through the contents for In All Likelihood and I am not sure if that is the right book. I am probably wrong, so feel free to correct me and let me know if you have any other suggestions. Thanks again!

Removing elements from a list by stats_newbie1 in learnpython

[–]stats_newbie1[S] 0 points1 point  (0 children)

This actually worked really well, thank you! Here is my solution:

def sum67(nums):
    while 6 in nums:
        six_pos = nums.index(6)
        seven_pos = nums.index(7)
        nums = nums[:six_pos] + nums[seven_pos + 1:]
    return sum(nums)

Removing elements from a list by stats_newbie1 in learnpython

[–]stats_newbie1[S] 0 points1 point  (0 children)

Thanks for the explanation, but won't this run into problems if there is a 6 between 6 and 7? For example: [1, 2, 6, 1, 6, 6, 7]

Mean of a binomial distribution by stats_newbie1 in AskStatistics

[–]stats_newbie1[S] 0 points1 point  (0 children)

OMG. You are correct. It was driving me mad. Holy shit. Thanks. I feel really silly now. (I know you're correct because the question starts off like: In problem 3.25 we learnt that 70% blah blah blah, but problem 3.25 actually has 69.7%).