How to get the maximum number of digits after the decimal point in a Pandas series
pd.read_csv() typically returns a DataFrame object.  The StringMethods object returned by using .str is only defined for a Series object.  Try using pd.read_csv('your_data.csv' , squeeze=True) to have it return a Series object; then you will be able to use .str
I read a list of float values of varying precision from a csv file into a Pandas Series and need the number of digits after the decimal point. So, for 123.4567 I want to get 4.
I managed to get the number of digits for randomly generated numbers like this:

df = pd.Series(np.random.rand(100)*1000)
precision_digits = (df - df.astype(int)).astype(str).str.split(".", expand=True)[1].str.len().max()

However, if I read data from disk using pd.read_csv where some of the rows are empty (and thus filled with nan), I get the following error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/tgamauf/workspace/mostly-sydan/venv/lib/python3.6/site-packages/pandas/core/generic.py", line 4376, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'str'

What is going wrong here?
Is there a better way to do what I need?