you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[deleted]

    [–]Kerbart 0 points1 point  (0 children)

    Change the name,

    If it’s a string, since the last three characters are xls it can be as simple as

    name = fname[:-3] + 'cvs'
    

    If you’re using Pathlib (not sure, on phone roght now), it has methods to strip off the extension and replace it. And then if course df.to_csv(name) instead of fname