# Path: bamboo/lib/utils.py
# def is_float_nan(num):
#     """Return True is `num` is a float and NaN."""
#     return isinstance(num, float) and isnan(num)


from calendar import timegm
from datetime import datetime
from dateutil.parser import parse as date_parse
from bamboo.lib.utils import is_float_nan
import numpy as np
    dframe_columns = dframe.columns.tolist()

    for column, column_schema in schema.items():
        if column in dframe_columns and schema.is_date_simpletype(column):
            new_column = _convert_column_to_date(dframe, column)

            if not new_column is None:
                dframe[column] = new_column

    return dframe


def recognize_dates(df, schema=None):
    """Convert data columns to datetimes.

    Check if object columns in a dataframe can be parsed as dates.
    If yes, rewrite column with values parsed as dates.

    If schema is passed, convert columes to datetime if column in *schema* is
    of type datetime.

    :param df: The DataFrame to convert columns in.
    :param schema: Schema to define columns of type datetime.

    :returns: A DataFrame with column values convert to datetime types.
    """
    return __parse_dates_schema(df, schema) if schema else __parse_dates(df)


def _is_potential_date(value):

# Path: bamboo/lib/utils.py
# def is_float_nan(num):
#     """Return True is `num` is a float and NaN."""
#     return isinstance(num, float) and isnan(num)


# Path: bamboo/lib/datetools.py
from calendar import timegm
from datetime import datetime
from dateutil.parser import parse as date_parse
from bamboo.lib.utils import is_float_nan
import numpy as np

    dframe_columns = dframe.columns.tolist()

    for column, column_schema in schema.items():
        if column in dframe_columns and schema.is_date_simpletype(column):
            new_column = _convert_column_to_date(dframe, column)

            if not new_column is None:
                dframe[column] = new_column

    return dframe


def recognize_dates(df, schema=None):
    """Convert data columns to datetimes.

    Check if object columns in a dataframe can be parsed as dates.
    If yes, rewrite column with values parsed as dates.

    If schema is passed, convert columes to datetime if column in *schema* is
    of type datetime.

    :param df: The DataFrame to convert columns in.
    :param schema: Schema to define columns of type datetime.

    :returns: A DataFrame with column values convert to datetime types.
    """
    return __parse_dates_schema(df, schema) if schema else __parse_dates(df)


def _is_potential_date(value):

    return not (is_float_nan(value) or isinstance(value, bool))