zoukankan      html  css  js  c++  java
  • pandas

    function interpretation
    pd.Series(list of values) creste a list with default integer index, you can access value by using s[index]
    pd.read_csv("name of csv")
    pd.concat((df1, df3), axis= ,join = "" sort) concatenate dataframes
    df = pd.DataFrame()
    df.info()
    df.index *no brackets, return a list of index
    df.empty return a boolean, True if empty
    df.ndim return dimension count
    df.shape
    df.size get count of elements
    df.at([index, column]) access single element
    df.reset_index()
    df.append() smilar to pd.concat
    df.query('condition') such as 'a>100 and 'b<20'
    df.to_html()
    df.max() default axis=0, return maximum of every column
    df.max().max() maximum of the table
    df.mean()
    df.mean().mean()
    df.fillna()
    df.axes axes info
    df.columns columns name, can be rewriten
    df.dtype
    df.iterrows() iterate over rows
    df.rename() rename the column name
    df.select_dtype(include='typename') select data by datatype
    df.sort_values() sort by column name
    df.sort_index() sort by index
    df.drop() delete columns
    df.set_index() set certain column as index
    df.reindex() change order of columns
    df.replace() replace values
    df.loc()/df.iloc()
    df.append() add rows
    df.head() get first n rows
    df.to_numpy() to numpy array
  • 相关阅读:
    The 2014 ACM-ICPC Asia Xi'an Regional Contest — F题 Color
    CodeForces 358D — Dima and Hares
    VIJOS国庆节模拟赛之繁星春水
    两个算法
    HDU 4901
    Andrew Stankevich Contests #2
    HDU 4701
    HDU 5033
    程序安装出现错误代码为2869
    常用正则表达式总结(以后加了再补充)
  • 原文地址:https://www.cnblogs.com/ashyLoveLoli/p/15204564.html
Copyright © 2011-2022 走看看