About 98,500 results
Open links in new tab
  1. python - Finding the average of a list - Stack Overflow

    Dec 8, 2023 · I tried these timings with a list of length 100000000: mean2 < 1s; mean3,4 ~ 8s; mean5,6 ~ 27s; mean1 ~1minute. I find this surprising, would have expected numpy to be best …

  2. python - pandas get column average/mean - Stack Overflow

    I can't get the average or mean of a column in pandas. A have a dataframe. Neither of things I tried below gives me the average of the column weight &gt;&gt;&gt; allDF ID birth...

  3. python - Using a for loop to calculate the average - Stack Overflow

    Dec 3, 2018 · In the above code, each element of new_list is element of input list (lst=mylist) divided by average of input list. One can obtain average by using the following: average = sum …

  4. python - How can I get the average of a range of inputs ... - Stack ...

    Sep 29, 2016 · average = float(sum_grade)s / max(num_grades,1) I used the max function that returns the maximum number between num_grades and 1 - in case the list of grades is empty, …

  5. python - Find min, max, and average of a list - Stack Overflow

    I am having hard time to figure out how to find min from a list for example somelist = [1,12,2,53,23,6,17] how can I find min and max of this list with defining (def) a function I do not …

  6. python - Average time for datetime list - Stack Overflow

    Oct 30, 2013 · Looking for fastest solution of time averaging problem. I've got a list of datetime objects. Need to find average value of time (excluding year, month, day). Here is what I got so …

  7. finding the average using functions in python - Stack Overflow

    Oct 28, 2020 · I do not understand how to find the average of two or more numbers. I tried importing the statistics library, so I could use the mean function, but something is not working. …

  8. python - Fastest way to compute average of a list - Stack Overflow

    May 7, 2025 · I want to find the fastest way to compute the average of python lists. I have millions of lists stored in a dictionary, so I am looking for the most efficient way in terms for …

  9. python - how to get the average of dataframe column values

    2013-05-09 NaN 23 2013-05-10 NaN 10 say i have the dataframe above. what is the easiest way to get a series with the same index which is the average of the columns A and B? the average …

  10. Python - Calculate average for every column in a csv file

    Sep 1, 2014 · I'm new in Python and I'm trying to get the average of every (column or row) of a csv file for then select the values that are higher than the double of the average of its column …

Refresh