Python有相关的功能模块
查看其相应的说明,按其规定操作即可。
下面是导入EXCEL的CVS文件的示例代码:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from collections import Counter
读cvs文件
data = pd.read_csv('./dataset/NationalNames.csv')
data.head()
读excel文件
data=pd.read_excel('./dataset/NationalNames.xlsx',header=0, encoding='utf-8')