Skip to content

bug in DataFrame/DataMatrix toCSV method when index=False #81

Closed
@changhiskhan

Description

@changhiskhan

When index=False an extra column is added because the leading comma is never removed.

def toCSV(self, path, nanRep='', cols=None, header=True, index=True, mode='wb'):

    *<snip>*

    for idx in self.index:

        if index:
            f.write(str(idx))
        for col in cols:
            *<snip>*
            f.write(',%s' % val)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions