共用方式為


DataFrame.LoadCsvFromString 方法

定義

讀取以字串的形式傳入 DataFrame 的 CSV 數據。

public static Microsoft.Data.Analysis.DataFrame LoadCsvFromString (string csvString, char separator = ',', bool header = true, string[] columnNames = default, Type[] dataTypes = default, long numberOfRowsToRead = -1, int guessRows = 10, bool addIndexColumn = false, bool renameDuplicatedColumns = false, System.Globalization.CultureInfo cultureInfo = default);
static member LoadCsvFromString : string * char * bool * string[] * Type[] * int64 * int * bool * bool * System.Globalization.CultureInfo -> Microsoft.Data.Analysis.DataFrame
Public Shared Function LoadCsvFromString (csvString As String, Optional separator As Char = ',', Optional header As Boolean = true, Optional columnNames As String() = Nothing, Optional dataTypes As Type() = Nothing, Optional numberOfRowsToRead As Long = -1, Optional guessRows As Integer = 10, Optional addIndexColumn As Boolean = false, Optional renameDuplicatedColumns As Boolean = false, Optional cultureInfo As CultureInfo = Nothing) As DataFrame

參數

csvString
String

以字串的形式傳入的 csv 數據

separator
Char

數據行分隔符

header
Boolean

具有標頭或不具有標頭

columnNames
String[]

數據行名稱 (可以是空的)

dataTypes
Type[]

數據行類型 (可以是空的)

numberOfRowsToRead
Int64

如果存在) ,則表示要讀取的數據列數目不包含標頭 (

guessRows
Int32

用來猜測類型的數據列數目

addIndexColumn
Boolean

使用數據列索引新增一個數據行

renameDuplicatedColumns
Boolean

如果設定為 true,則會自動重新命名重複名稱的數據行。

cultureInfo
CultureInfo

格式化值的文化特性資訊

傳回

DataFrame

適用於