Python has many built-in functions that help you work with data quickly without writing your own code from scratch.
Some useful ones for data analytics include:
len() — returns the length of a list, string, or other collectionsum() — adds all numbers in a listmin() — finds the smallest valuemax() — finds the largest valueround() — rounds a float to a given number of decimal placesnumbers = [4, 7, 1, 9]
print(len(numbers)) # Outputs 4
print(sum(numbers)) # Outputs 21
print(min(numbers)) # Outputs 1
print(max(numbers)) # Outputs 9
print(round(3.14159, 2)) # Outputs 3.14