Panda Library in Python 1

Source: Internet
Author: User

1 Example 1

1  from pandas import read_csv; 2 3 df = read_csv ('h://pythoncode//4.1//1.csv')4 DF

1.1 Modifying the content encoding of a table

1 df = read_csv ('d://pa//4.1//1.csv', encoding='UTF-8' )

2 Removing duplicate rows

(1) Read a CSV

from = read_csv ('h:\\python Data Analysis Basics and practices ' VIP tutorials \ \ Chapter 4 Data processing \\4.3\\data.csv' )

(2) Remove the duplicate

Df= df.drop_duplicates ();

3 Working with Excel files

#函数原型
#read_excel (Filename,sheetname,header)
#参数意思
#filename: File path
#sheetname: Sheet's name

DF = read_excel (' h://pythoncode//4.1//3.xlsx ', sheetname= ' data ')

Panda Library in Python 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.