Loading tabular data¶
How to load data from a tsv file¶
We can load a file containing tab seperated values with the load_tabular
app, providing it with the appropriate separator, sep="\t"
.
How to load data from a csv file¶
We can load a file containing comma seperated values with the load_tabular
app, providing it with the seperator, sep=","
.
In the above example, data
is a cogent3.util.Table
object, if we write it to disk in csv format, we can re-use it for this example too.
Tip
If you are executing this code on your machine, replace path_to_csv_file
with the path containing your csv file!