View Code? Open in Web Editor
NEW
This project forked from scisharp/pandas.net
Pandas port in C#, data analysis tool.
pandas.net's Introduction
- DataFrame
pd.DataFrame(NDArray data, IList<string> index, IList<string> columns, Type dtype)
pd.DataFrame<TIndex>(NDArray data, IList<TIndex> index, IList<string> columns, Type dtype)
pd.DataFrame(IDictionary<string, NDArray> data, IList<string> index)
pd.DataFrame<TIndex>(IDictionary<string, NDArray> data, IList<TIndex> index)
- Series
pd.Series(NDArray data)
pd.Series(Array data)
pd.Series<T>(T data)
- df.Index
- df.Columns
- df.Values
- df.Shape
- df.NDIM
- df.Size
-
df[0]
:按列索引选取数据(返回Series)
-
df[params int[] columnIndexs]
:按列索引选取数据(返回DataFrame)
-
df["column_label"]
:按列标签选取数据(返回Series);可通过 set
访问器增加列(如果列标签不存在)
-
df[params string[] columnLabels]
:按列标签选取数据(返回DataFrame)
-
df.Column(string columnLabel, NDArray value)
:设置列以及列的值;当列不存在时创建
-
df.Column(int columnIndex, NDArray value)
:设置列以及列的值;当列不存在时报异常
-
df[Slice s]
:行切片选取数据
-
df.loc["index_label"]
:按行索引标签选取数据
-
df.loc["index_label", "column_label"]
:按行和列标签选取数据
-
df.iloc[0]
:按行索引(row number)选取数据
pandas.net's People
Watchers