C# 클래스 Encog.Util.CSV.ReadCSV

Read and parse CSV format files.
파일 보기 프로젝트 열기: encog/encog-silverlight-core 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Close the file.

Get ( String column ) : String

Get the column by its string name, as a string. This will only work if column headers were defined that have string names.

Get ( int i ) : String

Get the specified column as a string.

GetCount ( ) : int

Get the column count.

GetDate ( String column ) : System.DateTime

Read the specified column as a date.

GetDate ( int column ) : System.DateTime

Read the specified column as a date.

GetDouble ( String column ) : double

Get the specified column as a double.

GetDouble ( int column ) : double

Get the specified column as a double.

GetInt ( String col ) : int

Get an integer that has the specified name.

GetTime ( String column ) : System.DateTime

Read the specified column as a time.

GetTime ( int column ) : System.DateTime

Read the specified column as a time.

HasMissing ( ) : bool

Check to see if there are any missing values on the current row.

Next ( ) : bool

Read the next line.

ParseDate ( String when, String dateFormat ) : System.DateTime

Parse a date using the specified format.

ReadCSV ( Stream stream, bool headers, CSVFormat format ) : System

Construct a CSV reader from an input stream. The format parameter specifies the separator character to use, as well as the number format.

ReadCSV ( Stream istream, bool headers, char delim ) : System

Construct a CSV reader from an input stream.

ReadCSV ( String filename, bool headers, CSVFormat format ) : System

Construct a CSV reader from a filename. Allows a delimiter character to be specified. Numbers will be parsed using the current locale.

ReadCSV ( String filename, bool headers, char delim ) : System

Construct a CSV reader from a filename.

비공개 메소드들

메소드 설명
Begin ( bool headers, CSVFormat format ) : void

Read the headers.

GetLong ( int col ) : long
InitData ( string line ) : void

Count the columns and create a an array to hold them.

Parse ( string line ) : IList
ParseCharSep ( string line ) : IList

Parse the line into a list of values.

ParseSpaceSep ( String line ) : List

Parse a line with space separators.

메소드 상세

Close() 공개 메소드

Close the file.
public Close ( ) : void
리턴 void

Get() 공개 메소드

Get the column by its string name, as a string. This will only work if column headers were defined that have string names.
public Get ( String column ) : String
column String The column name.
리턴 String

Get() 공개 메소드

Get the specified column as a string.
public Get ( int i ) : String
i int The column index, starting at zero.
리턴 String

GetCount() 공개 메소드

Get the column count.
public GetCount ( ) : int
리턴 int

GetDate() 공개 메소드

Read the specified column as a date.
public GetDate ( String column ) : System.DateTime
column String The specified column.
리턴 System.DateTime

GetDate() 공개 메소드

Read the specified column as a date.
public GetDate ( int column ) : System.DateTime
column int The specified column.
리턴 System.DateTime

GetDouble() 공개 메소드

Get the specified column as a double.
public GetDouble ( String column ) : double
column String The column to read.
리턴 double

GetDouble() 공개 메소드

Get the specified column as a double.
public GetDouble ( int column ) : double
column int The column to read.
리턴 double

GetInt() 공개 메소드

Get an integer that has the specified name.
public GetInt ( String col ) : int
col String The column name to read.
리턴 int

GetTime() 공개 메소드

Read the specified column as a time.
public GetTime ( String column ) : System.DateTime
column String The specified column.
리턴 System.DateTime

GetTime() 공개 메소드

Read the specified column as a time.
public GetTime ( int column ) : System.DateTime
column int The specified column.
리턴 System.DateTime

HasMissing() 공개 메소드

Check to see if there are any missing values on the current row.
public HasMissing ( ) : bool
리턴 bool

Next() 공개 메소드

Read the next line.
public Next ( ) : bool
리턴 bool

ParseDate() 공개 정적인 메소드

Parse a date using the specified format.
public static ParseDate ( String when, String dateFormat ) : System.DateTime
when String A string that contains a date in the specified format.
dateFormat String The date format.
리턴 System.DateTime

ReadCSV() 공개 메소드

Construct a CSV reader from an input stream. The format parameter specifies the separator character to use, as well as the number format.
public ReadCSV ( Stream stream, bool headers, CSVFormat format ) : System
stream Stream The Stream to read from.
headers bool Are headers present?
format CSVFormat What is the CSV format.
리턴 System

ReadCSV() 공개 메소드

Construct a CSV reader from an input stream.
public ReadCSV ( Stream istream, bool headers, char delim ) : System
istream Stream The InputStream to read from.
headers bool Are headers present?
delim char What is the delimiter.
리턴 System

ReadCSV() 공개 메소드

Construct a CSV reader from a filename. Allows a delimiter character to be specified. Numbers will be parsed using the current locale.
public ReadCSV ( String filename, bool headers, CSVFormat format ) : System
filename String The filename.
headers bool The headers.
format CSVFormat The delimiter.
리턴 System

ReadCSV() 공개 메소드

Construct a CSV reader from a filename.
public ReadCSV ( String filename, bool headers, char delim ) : System
filename String The filename.
headers bool The headers.
delim char The delimiter.
리턴 System