code: def ecdf(s: "Series") -> Tuple["ndarray", "ndarray"]:
      """Return cumulative distribution of values in a series.
  
      Null values must be dropped from the series,
      otherwise a `ValueError` is raised.
  
      Also, if the `dtype` of the series is not numeric,
      a `TypeError` is raised.
  
      Examples:
          >>> import pandas as pd
          >>> import janitor
          >>> s = pd.Series([0, 4, 0, 1, 2, 1, 1, 3])
          >>> x, y = s.ecdf()
          >>> x  # doctest: +SKIP
          array([0, 0, 1, 1, 1, 2, 3, 4])
          >>> y  # doctest: +SKIP
          array([0.125, 0.25 , 0.375, 0.5  , 0.625, 0.75 , 0.875, 1.   ])
  
          You can then plot the ECDF values, for example:
  
          >>> from matplotlib import pyplot as plt
          >>> plt.scatter(x, y)  # doctest: +SKIP
  
      Args:
          s: A pandas series. `dtype` should be numeric.
  
      Raises:
          TypeError: If series is not numeric.
          ValueError: If series contains nulls.
  
      Returns:
          x: Sorted array of values.
          y: Cumulative fraction of data points with value `x` or lower.
      """
      import numpy as np
      import pandas.api.types as pdtypes
  
      if not pdtypes.is_numeric_dtype(s):
          raise TypeError(f"series {s.name} must be numeric!")
      if not s.isna().sum() == 0:
          raise ValueError(
              f"series {s.name} contains nulls. Please drop them."
          )
  
      n = len(s)
      x = np.sort(s)
      y = np.arange(1, n + 1) / n
  
      return x, y
  
file_path: pyjanitor/janitor/math.py
imports: import warnings
  from typing import TYPE_CHECKING, Tuple
  import pandas_flavor
label_desc: Use image node_id 9 for calling a global function with example usage: ecdf(s) and returns: x,  y