官术网_书友最值得收藏!

pandas DataFrame

You may often see df appearing on Python-based data science resources and literature. It is a conventional way to denote the pandas DataFrame structure. pandas lets us perform the otherwise tedious operations on tables (data frames) with simple commands, such as dropna(), merge(), pivot(), and set_index().

pandas is designed to streamline handling processes of common data types, such as time series. While NumPy is more specialized in mathematical calculations, pandas has built-in string manipulation functions and also allows custom functions to be applied to each cell via apply().

Before use, we import the module with the conventional shorthand as:

pd.DataFrame(my_list_or_array)

To read data from existing files, just use the following:

pd.read_csv()

For tab-delimited files, just add '\t' as the separator: 

pd.read_csv(sep='\t')

pandas supports data import from a wide range of common file structures for data handling and processing, from pd.read_xlsx() for Excel and pd.read_sql_query() for SQL databases to the more recently popular JSON, HDF5, and Google BigQuery.

pandas provides a collection of handy operations for data manipulation and is considered a must-have in a Python data scientist's or developer's toolbox.

We encourage our readers to seek resources and books on our Mapt platform to get a better and intimate understanding of the pandas library usage. 

To fully understand and utilize the functionalities, you may want to read more from the official documentation: 

http://pandas.pydata.org/pandas-docs/stable/ 

主站蜘蛛池模板: 互助| 修文县| 巴彦县| 荔浦县| 华亭县| 苍溪县| 彭山县| 凤冈县| 湖南省| 沅陵县| 廉江市| 白山市| 博湖县| 新兴县| 阜宁县| 林口县| 江源县| 渝中区| 新巴尔虎右旗| 长治市| 万山特区| 菏泽市| 刚察县| 新泰市| 健康| 呼伦贝尔市| 兴宁市| 南澳县| 德江县| 什邡市| 平凉市| 靖州| 余姚市| 河西区| 岢岚县| 海盐县| 徐汇区| 奈曼旗| 汾西县| 会泽县| 博爱县|