def add_column(self, colname, quantity, unit=False, overwrite=True, **kwargs):
    '\n        Return an new TimeSeries with the given column added or updated.\n\n        Parameters\n        ----------\n        colname : `str`\n            The heading of the column you want output.\n\n        quantity : `~astropy.units.quantity.Quantity` or `~numpy.ndarray`\n            The values to be placed within the column.\n            If updating values only then a numpy array is permitted.\n\n        overwrite : `bool`, optional, default:True\n            Set to true to allow the method to overwrite a column already present\n            in the TimeSeries.\n\n        Returns\n        -------\n        newts : TimeSeries\n\n        '
    if ((not unit) and isinstance(quantity, astropy.units.quantity.Quantity)):
        unit = quantity.unit
    elif (not unit):
        unit = u.dimensionless_unscaled
    data = copy.copy(self.data)
    meta = TimeSeriesMetaData(copy.copy(self.meta.metadata))
    units = copy.copy(self.units)
    if (not (colname in self.data.columns)):
        units[colname] = unit
    values = quantity
    if (isinstance(values, astropy.units.quantity.Quantity) and overwrite):
        values = values.to(units[colname]).value
    if ((not (colname in self.data.columns)) or overwrite):
        data[colname] = values
    return self.__class__(data, meta, units)
Return an new TimeSeries with the given column added or updated.

Parameters
----------
colname : `str`
    The heading of the column you want output.

quantity : `~astropy.units.quantity.Quantity` or `~numpy.ndarray`
    The values to be placed within the column.
    If updating values only then a numpy array is permitted.

overwrite : `bool`, optional, default:True
    Set to true to allow the method to overwrite a column already present
    in the TimeSeries.

Returns
-------
newts : TimeSeries
def add_column(self, colname, quantity, unit=False, overwrite=True, **kwargs):
    '\n        Return an new TimeSeries with the given column added or updated.\n\n        Parameters\n        ----------\n        colname : `str`\n            The heading of the column you want output.\n\n        quantity : `~astropy.units.quantity.Quantity` or `~numpy.ndarray`\n            The values to be placed within the column.\n            If updating values only then a numpy array is permitted.\n\n        overwrite : `bool`, optional, default:True\n            Set to true to allow the method to overwrite a column already present\n            in the TimeSeries.\n\n        Returns\n        -------\n        newts : TimeSeries\n\n        '
    if ((not unit) and isinstance(quantity, astropy.units.quantity.Quantity)):
        unit = quantity.unit
    elif (not unit):
        unit = u.dimensionless_unscaled
    data = copy.copy(self.data)
    meta = TimeSeriesMetaData(copy.copy(self.meta.metadata))
    units = copy.copy(self.units)
    if (not (colname in self.data.columns)):
        units[colname] = unit
    values = quantity
    if (isinstance(values, astropy.units.quantity.Quantity) and overwrite):
        values = values.to(units[colname]).value
    if ((not (colname in self.data.columns)) or overwrite):
        data[colname] = values
    return self.__class__(data, meta, units)