statistics.median()

statistics.median(data) Return the median (middle value) of numeric data, using the common “mean of middle two” method. If data is empty, StatisticsError is raised. The median is a robust measure of central location, and is less affected by the presence of outliers in your data. When the number of data points is odd, the middle data point is returned: >>> median([1, 3, 5]) 3 When the number of data points is even, the median is interpolated by taking the average of the two middle v

statistics.mean()

statistics.mean(data) Return the sample arithmetic mean of data, a sequence or iterator of real-valued numbers. The arithmetic mean is the sum of the data divided by the number of data points. It is commonly called “the average”, although it is only one of many different mathematical averages. It is a measure of the central location of the data. If data is empty, StatisticsError will be raised. Some examples of use: >>> mean([1, 2, 3, 4, 4]) 2.8 >>> mean([-1.0, 2.5, 3.25, 5

staticmethod()

staticmethod(function) Return a static method for function. A static method does not receive an implicit first argument. To declare a static method, use this idiom: class C: @staticmethod def f(arg1, arg2, ...): ... The @staticmethod form is a function decorator – see the description of function definitions in Function definitions for details. It can be called either on the class (such as C.f()) or on an instance (such as C().f()). The instance is ignored except for its class. Stati

stat.S_ISWHT()

stat.S_ISWHT(mode) Return non-zero if the mode is from a whiteout. New in version 3.4.

stat.S_ISSOCK()

stat.S_ISSOCK(mode) Return non-zero if the mode is from a socket.

stat.S_ISREG()

stat.S_ISREG(mode) Return non-zero if the mode is from a regular file.

stat.S_ISPORT()

stat.S_ISPORT(mode) Return non-zero if the mode is from an event port. New in version 3.4.

stat.S_ISLNK()

stat.S_ISLNK(mode) Return non-zero if the mode is from a symbolic link.

stat.S_ISFIFO()

stat.S_ISFIFO(mode) Return non-zero if the mode is from a FIFO (named pipe).

stat.S_ISDOOR()

stat.S_ISDOOR(mode) Return non-zero if the mode is from a door. New in version 3.4.