You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pandas relies on the writer in cpython's csv to save DataFrame to the given csv file.
When the escapechar is given to pandas, it passes it to writer object as escapedchar.
The quoting is set to the default value, csv.QUOTE_MINIMAL.
The expectation is that data surrounded the given escaped char or delimiter are surronded by quotes. Instead, csv writer just added escaped char after escapted char.
Please see the example below.
Bug report
Bug description:
This is related to the issue in pandas.
pandas-dev/pandas#59454
The pandas relies on the writer in cpython's csv to save DataFrame to the given csv file.
When the escapechar is given to pandas, it passes it to writer object as escapedchar.
The quoting is set to the default value, csv.QUOTE_MINIMAL.
The expectation is that data surrounded the given escaped char or delimiter are surronded by quotes. Instead, csv writer just added escaped char after escapted char.
Please see the example below.
Name,Branch,Year,CGPA
Nik,,hil,COE,2,9.0
San,,chit,COE,2,9.1
Adi,,tya,IT,2,9.3
Sa,,gar,SE,1,9.5
Pra,,teek,MCE,3,7.8
Sa,,hil,EP,2,9.1
Name,Branch,Year,CGPA
"Nik,hil",COE,2,9..0
"San,chit",COE,2,9..1
"Adi,tya",IT,2,9..3
"Sa,gar",SE,1,9..5
"Pra,teek",MCE,3,7..8
"Sa,hil",EP,2,9..1
CPython versions tested on:
3.11
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: