Data Frame.Read Csv Method
Definition
Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Read |
Reads a data frame from a CSV file.
Obsolete. |
Read |
Reads a data frame from a CSV file.
Obsolete. |
Read |
Reads a data frame from a CSV file and uses the specified column
as the row index.
Obsolete. |
Read |
Reads a data frame from a CSV file and uses the specified column
as the row index.
Obsolete. |
ReadCsv(StreamReader, Boolean, Int32, CultureInfo, Boolean, Int32)
Reads a data frame from a CSV file.
[ObsoleteAttribute("Use the classes in the Extreme.Data package instead.")]
public static DataFrame<long, string> ReadCsv(
StreamReader reader,
bool hasHeaders = true,
int skipLines = 0,
CultureInfo culture = null,
bool decimalAsDouble = true,
int inferenceRows = 2147483647
)
Parameters
- reader StreamReader
- A stream reader for the file.
- hasHeaders Boolean (Optional)
- Specifies whether the first record contains column headers. The default is true.
- skipLines Int32 (Optional)
- The number of lines to skip at the beginning of the file. The default is 0.
- culture CultureInfo (Optional)
- The culture to use for parsing numbers and dates.
- decimalAsDouble Boolean (Optional)
- Specifies whether columns containing numbers with decimals should be returned as Double instead of Decimal.
- inferenceRows Int32 (Optional)
- The number of records to use to infer the data types of the columns. The default is 10.
Return Value
DataFrame<Int64, String>A data frame that contains the data in the CSV file.
Exceptions
IOException | The file could not be found. |
Format | The file is not in the proper format. |
ReadCsv(String, Boolean, Int32, CultureInfo, Boolean, Int32)
Reads a data frame from a CSV file.
[ObsoleteAttribute("Use the classes in the Extreme.Data package instead.")]
public static DataFrame<long, string> ReadCsv(
string path,
bool hasHeaders = true,
int skipLines = 0,
CultureInfo culture = null,
bool decimalAsDouble = true,
int inferenceRows = 2147483647
)
Parameters
- path String
- The path to the file.
- hasHeaders Boolean (Optional)
- Specifies whether the first record contains column headers. The default is true.
- skipLines Int32 (Optional)
- The number of lines to skip at the beginning of the file. The default is 0.
- culture CultureInfo (Optional)
- The culture to use for parsing numbers and dates.
- decimalAsDouble Boolean (Optional)
- Specifies whether columns containing numbers with decimals should be returned as Double instead of Decimal.
- inferenceRows Int32 (Optional)
- The number of records to use to infer the data types of the columns. The default is 10.
Return Value
DataFrame<Int64, String>A data frame that contains the data in the CSV file.
Exceptions
IOException | The file could not be found. |
Format | The file is not in the proper format. |
ReadCsv<R>(StreamReader, String, Boolean, Boolean, Int32, CultureInfo, Boolean, Int32)
Reads a data frame from a CSV file and uses the specified column
as the row index.
[ObsoleteAttribute("Use the classes in the Extreme.Data package instead.")]
public static DataFrame<R, string> ReadCsv<R>(
StreamReader reader,
string keyColumn,
bool dropKeyColumn = true,
bool hasHeaders = true,
int skipLines = 0,
CultureInfo culture = null,
bool decimalAsDouble = true,
int inferenceRows = 10
)
Parameters
- reader StreamReader
- A stream reader for the file.
- keyColumn String
- The name of the column that contains the column keys.
- dropKeyColumn Boolean (Optional)
- If true, the key column is not included in the returned data frame.
- hasHeaders Boolean (Optional)
- Specifies whether the first record contains column headers. The default is true.
- skipLines Int32 (Optional)
- The number of lines to skip at the beginning of the file. The default is 0.
- culture CultureInfo (Optional)
- The culture to use for parsing numbers and dates.
- decimalAsDouble Boolean (Optional)
- Specifies whether columns with decimal values should be returned as Double or Decimal.
- inferenceRows Int32 (Optional)
- The number of records to use to infer the data types of the columns. The default is 10.
Type Parameters
- R
- The type of the row keys.
Return Value
DataFrame<R, String>A data frame that contains the data in the CSV file.
Exceptions
Key | A column named keyColumn was not found in the file. |
IOException | The file could not be found. |
Format | The file is not in the proper format. |
ReadCsv<R>(String, String, Boolean, Boolean, Int32, CultureInfo, Boolean, Int32)
Reads a data frame from a CSV file and uses the specified column
as the row index.
[ObsoleteAttribute("Use the classes in the Extreme.Data package instead.")]
public static DataFrame<R, string> ReadCsv<R>(
string path,
string keyColumn,
bool dropKeyColumn = true,
bool hasHeaders = true,
int skipLines = 0,
CultureInfo culture = null,
bool decimalAsDouble = true,
int inferenceRows = 10
)
Parameters
- path String
- The path to the file.
- keyColumn String
- The name of the column that contains the column keys.
- dropKeyColumn Boolean (Optional)
- If true, the key column is not included in the returned data frame.
- hasHeaders Boolean (Optional)
- Specifies whether the first record contains column headers. The default is true.
- skipLines Int32 (Optional)
- The number of lines to skip at the beginning of the file. The default is 0.
- culture CultureInfo (Optional)
- The culture to use for parsing numbers and dates.
- decimalAsDouble Boolean (Optional)
- Specifies whether columns with decimal values should be returned as Double or Decimal.
- inferenceRows Int32 (Optional)
- The number of records to use to infer the data types of the columns. The default is 10.
Type Parameters
- R
- The type of the row keys.
Return Value
DataFrame<R, String>A data frame that contains the data in the CSV file.
Exceptions
Key | A column named keyColumn was not found in the file. |
IOException | The file could not be found. |
Format | The file is not in the proper format. |