Sanitize values in pxname and svname columns
Sanitize values in pxname and svname columns

We used to replace any '.' characters with '_' character for all rows
in the pxname and svname columns at the time we were sending metrics to
Graphite. This led to duplicate code since we have to call replace()
multiple times.

We now perform the sanitization once and after Pandas data frame has
been created. Unfortunately, apply function of Pandas doesn't support
inplace write, thus we have to add a new column and use that one.
We could do a trick to avoid this extra column by having a helper
function:

def apply_inplace(df, field, func):
    return pd.concat([df.drop(field, axis=1), df[field].apply(func)], axis=1)

new_df = apply_inplace(df, foo_field, foo_fun)

The trick is the concatenation of 2 data frames. I timed-it this helper
function and was ~5 times slower than adding another column, thus I didn't
use it.

unixsurfer/haproxystats,unixsurfer/haproxystats,unixsurfer/haproxystats