def format_data(data):
    """ Formats floating point number to 6 digits.

        Args:
            data (double): data that must be formatted

        Returns:
            str: formatted data.

        Example:
            >>> format_data(1.222222222222222)
            >>> '1.222222'
            >>> format_data('str')
            >>> 'str'
            >>> format_data(0.123456789)
            >>> '0.123457'
            >>> format_data('0.05')
            >>> '0.050000'
    """
    try:
        float_data = float(data)
    except ValueError:
        return str(data)
    else:
        return '%.6f' % float_data
