def __init__(self, data, columns=None, **kwargs):
if not isinstance(data, str):<EOL><INDENT>self.filepath = None<EOL>self.metadata = {}<EOL>super().__init__(data, columns=columns, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>filepath = data  <EOL>self.filepath = filepath<EOL>self.metadata, data, read_columns = _read_and_return_metadata_df(filepath)<EOL>columns = columns if columns is not None else {}<EOL>for k, v in read_columns.items():<EOL><INDENT>columns.setdefault(k, v)<EOL><DEDENT>columns.setdefault("<STR_LIT>", ["<STR_LIT>"])<EOL>columns.setdefault("<STR_LIT>", ["<STR_LIT>"])<EOL>columns.setdefault("<STR_LIT>", ["<STR_LIT>"])<EOL>super().__init__(data, columns=columns, **kwargs)<EOL><DEDENT>
Initialise a MAGICCData instance

Here we provide a brief over of inputs, for more details
see ``openscm.ScmDataFrameBase``.

Parameters
----------
data: pd.DataFrame, pd.Series, np.ndarray or string
    A pd.DataFrame or data file, or a numpy array of timeseries data if `columns` is specified.
    If a string is passed, data will be attempted to be read from file.

columns: dict
    Dictionary to use to write the metadata for each timeseries in data. MAGICCData will
    also attempt to infer values from data. Any values in columns will be used in
    preference to any values found in data. The default value for "model", "scenario"
    and "climate_model" is "unspecified". See ``openscm.ScmDataFrameBase`` for details.

kwargs:
    Additional parameters passed to `pyam.core.read_files` to read non-standard files.