We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sep
Hi! CSV developers!
Currently, the col_sep option is used in Ruby's CSV library,
col_sep
CSV.open("nice.tsv", col_sep: "\t")
but it requires 8 keystrokes. sep requires only 3 keystrokes.
The reason col_sep exists is because the row_sep option exists. However, row_sep is used much less frequently than col_sep.
row_sep
Using sep as an alias for col_sep would make using the CSV library a little easier and more enjoyable.
Many R and Python libraries use sep in the sense of col_sep. For example, pandas can read a tsv file as follows
import pandas as pd df = pd.read_csv(file_path, sep="\t")
In pandas, delimiter is an alias for sep. It is not uncommon for sep options to have aliases in this way.
delimiter
It took some courage to make such a proposal to a library with such a long history as CSV.
Thanks for reading.
The text was updated successfully, but these errors were encountered:
We may want to add TSV class that uses \t as the default column separator.
TSV
\t
Sorry, something went wrong.
I thought about it, and basically I agree.
Use col_sep all the time, but never needed to set row_sep explicitly.
7b8c3ca
We can use CSV::TSV.open("nice.tsv").
CSV::TSV.open("nice.tsv")
No branches or pull requests
Hi! CSV developers!
Currently, the
col_sep
option is used in Ruby's CSV library,but it requires 8 keystrokes.
sep
requires only 3 keystrokes.The reason
col_sep
exists is because therow_sep
option exists.However,
row_sep
is used much less frequently thancol_sep
.Using
sep
as an alias forcol_sep
would make using the CSV library a little easier and more enjoyable.Many R and Python libraries use
sep
in the sense ofcol_sep
. For example, pandas can read a tsv file as followsIn pandas,
delimiter
is an alias forsep
. It is not uncommon forsep
options to have aliases in this way.It took some courage to make such a proposal to a library with such a long history as CSV.
Thanks for reading.
The text was updated successfully, but these errors were encountered: