diff --git a/trackintel/io/file.py b/trackintel/io/file.py index d109ab93..9e9743a2 100644 --- a/trackintel/io/file.py +++ b/trackintel/io/file.py @@ -556,10 +556,7 @@ def read_tours_csv(*args, columns=None, index_col=None, tz=None, **kwargs): >>> trackintel.read_tours_csv('data.csv', columns={'uuid':'user_id'}) """ columns = {} if columns is None else columns - if "converters" not in kwargs: - kwargs["converters"] = {"trips": ast.literal_eval} - elif "trips" not in kwargs["converters"]: - kwargs["converters"]["trips"] = ast.literal_eval + kwargs.setdefault("converters", {}).setdefault("trips", ast.literal_eval) tours = pd.read_csv(*args, index_col=index_col, **kwargs) tours.rename(columns=columns, inplace=True)