Skip to content

New Feature Request: Allow special character for delimiter when reading CSV files #50

Open
@asokratis

Description

@asokratis

reader = csv.reader(item_file)

change it to

reader = csv.reader(item_file, delimiter=delimiter_character)

The comma by default is not a very strong delimiter especially with how cloud databases export these data in a dirty way.

Ideally, I would want to pass the delimiter character as a parameter when I use the import_events function.

m.import_events('mixpanel_uploads/test_file.csv',timezone_offset=0, delimiter_character='\x1f')

As a short term workaround, I tried to override the class and function of _list_from_items_filename to apply the changes and it did not work (is it because it is a @staticmethod?), so I had to edit the actual source code of the library I installed in the end and that seemed to do the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions