Skip to content

Commit

Permalink
Merge branch 'master' of github.com:duolabmeng6/pyefun
Browse files Browse the repository at this point in the history
  • Loading branch information
ll committed Jun 2, 2021
2 parents 210ab2b + d2b2efb commit ce779b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions example/pandas/pandas操作.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 教程
# https://pandas.pydata.org/pandas-docs/stable/index.html

import pandas
from pyefun import *


class 数据分析():
def __init__(self, 文件名):
扩展名 = 文件_取扩展名(文件名)
if 扩展名 == "xlsx":
self.pd = pandas.read_excel(文件名)
elif 扩展名 == "csv":
self.pd = pandas.read_csv(文件名)

def __str__(self, instance, value):
return self.pd


def 测试函数():
data = 数据分析("../excel/test.xlsx")
print(data)


测试函数()

0 comments on commit ce779b0

Please sign in to comment.