Fix #4087 by setting the correct csv dialect (#4103)

The error in #4087 was happening because of the use of csv.Dialect.*
which is just an empty base class. we need to make a choice on what is
our base dialect. I usually use excel so I put it as excel, if
maintainers have other preferences do let me know.

Open Questions:
1. What should be the default dialect?
2. Should we rework all tests to mock the open function rather than the
csv.DictReader?
3. Should we make a separate input for `dialect` like we have for
`encoding`?

---------

Co-authored-by: = <=>
This commit is contained in:
Paresh Mathur
2023-05-14 09:05:01 +05:30
committed by GitHub
parent 3ce78ef6c4
commit e2bc836571
5 changed files with 22 additions and 30 deletions
@@ -0,0 +1,3 @@
column1,column2,column3
value1,value2,value3
value4,value5,value6
1 column1 column2 column3
2 value1 value2 value3
3 value4 value5 value6
@@ -0,0 +1,4 @@
column1
value1
value2
value3
1 column1
2 value1
3 value2
4 value3
@@ -0,0 +1,2 @@
column1,column2,column3
value1,value2,value3
1 column1 column2 column3
2 value1 value2 value3