Skip to content

Commit b74855e

Browse files
authored
Merge pull request #214 from abostroem/issue198-datatype
adding clarifying limitations of CSV file format
2 parents cfdfa08 + f63a639 commit b74855e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

episodes/06-join.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,10 @@ read_back_csv.head(3)
10701070
```
10711071

10721072
The CSV file contains the names of the columns, but not the data types.
1073+
A keen observer may note that the `dataframe` that we wrote to the CSV file did not contain data types, so it is unsurprising that
1074+
the CSV file also does not.
1075+
However, even if we had written a CSV file from an astropy `Table`, which does contain data type,
1076+
data type would not appear in the CSV file, highlighting a limitation of this format.
10731077
Additionally, notice that the index in `candidate_df` has become an unnamed column
10741078
in `read_back_csv` and a new index has been created. The Pandas functions for writing and reading CSV
10751079
files provide options to avoid that problem, but this is an example of

0 commit comments

Comments
 (0)