CSV reader supporting strings

This function provides you with the data contained in a CSV file, column names and a term dictionary

Al momento, stai seguendo questo contributo

This function reads the data contain in a .csv file and transform it for its use. The function returns the next values:
data: contains the readed data. The columns that contains nominal values are transformed into numerical ones.
column_names: if the file contains a header, this variable saves the name of each column(*).
string_conversions: this variable contains the nominal values of the columns that have been transformed. If the column has numerical value, it contains {}. Otherwise, the nominal values are saved in column position.
(*)NOTE: In case of a entire nominal dataset with no header, the first example can be confused with header.

Example: the file contains the following data:
A,B,C,D
1,2,Sun,YES
3,1,Rain,YES
3,5,Sun,NO

Then, the function returns:
- data = [ 1 2 2 2
3 1 1 2
3 5 2 1]
- column_names = {'A','B','C', 'D'}
- string_conversions = {{}
{}
{'Rain' 'Sun'}
{'NO' 'YES'}}

Cita come

Pedro (2026). CSV reader supporting strings (https://it.mathworks.com/matlabcentral/fileexchange/48798-csv-reader-supporting-strings), MATLAB Central File Exchange. Recuperato .

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.0.0.0