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
  • 相关阅读:
    四则运算结对作业
    读《构建之法》第四、十七章有感
    四则运算练习的命令行软件
    Spring01
    oop01
    运行shell脚本的三种方式
    正则表达式的基础组成部分
    C语言文件函数
    shell文件描述符及重定向
    shell基础
  • 原文地址:https://www.cnblogs.com/ashyLoveLoli/p/15204564.html
Copyright © 2011-2022 走看看