pandas/io/excel/_base.py
def _value_with_fmt(self, val):
        """
        Convert numpy types to Python types for the Excel writers.

        Parameters
        ----------
        val : object
            Value to be written into cells

        Returns
        -------
        Tuple with the first element being the converted value and the second
            being an optional format
        """
        fmt = None

        if is_integer(val):
            val = int(val)
        elif is_float(val):
            val = float(val)
        elif is_bool(val):
            val = bool(val)
        elif isinstance(val, datetime.datetime):
            fmt = self.datetime_format
        elif isinstance(val, datetime.date):
            fmt = self.date_format
        elif isinstance(val, datetime.timedelta):
            val = val.total_seconds() / 86400
            fmt = "0"
        else:
            val = str(val)

        return val, fmt

        Convert numpy types to Python types for the Excel writers.

        Parameters
        ----------
        val : object
            Value to be written into cells

        Returns
        -------
        Tuple with the first element being the converted value and the second
            being an optional format
        
Convert numpy types to Python types for the Excel writers.
Parameters

val : object
Value to be written into cells

Returns

Tuple with the first element being the converted value and the second
being an optional format
Convert numpy types to Python types for the Excel writers . Parameters val : object Value to be written into cells Returns Tuple with the first element being the converted value and the second being an optional format
def _value_with_fmt(self, val):
        fmt = None
        if is_integer(val):
            val = int(val)
        elif is_float(val):
            val = float(val)
        elif is_bool(val):
            val = bool(val)
        elif isinstance(val, datetime.datetime):
            fmt = self.datetime_format
        elif isinstance(val, datetime.date):
            fmt = self.date_format
        elif isinstance(val, datetime.timedelta):
            val = val.total_seconds() / 86400
            fmt = "0"
        else:
            val = str(val)
        return val, fmt
def _value_with_fmt ( self , val ) : fmt = None if is_integer ( val ) : val = int ( val ) elif is_float ( val ) : val = float ( val ) elif is_bool ( val ) : val = bool ( val ) elif isinstance ( val , datetime . datetime ) : fmt = self . datetime_format elif isinstance ( val , datetime . date ) : fmt = self . date_format elif isinstance ( val , datetime . timedelta ) : val = val . total_seconds ( ) / 86400 fmt = "0" else : val = str ( val ) return val , fmt
Convert numpy types to Python types for the Excel writers.
Convert numpy types to Python types for the Excel writers .
"""
        Convert numpy types to Python types for the Excel writers.

        Parameters
        ----------
        val : object
            Value to be written into cells

        Returns
        -------
        Tuple with the first element being the converted value and the second
            being an optional format
        """
self
val