From ee9cf6a32264ad0f03ca348c127ea7da2d36e7aa Mon Sep 17 00:00:00 2001 From: hnu202109060208 Date: Sun, 4 Dec 2022 18:07:31 +0800 Subject: [PATCH] ADD file via upload --- 单天航班信息查询.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 单天航班信息查询.py diff --git a/单天航班信息查询.py b/单天航班信息查询.py new file mode 100644 index 0000000..9a7eea6 --- /dev/null +++ b/单天航班信息查询.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +""" +Created on Wed Nov 30 19:15:52 2022 + +@author: DELL +""" +import pandas as pd +df = pd.read_csv("contentt.csv", encoding=('gb2312'),names=["date","flightNum", "depTime", "arrTime", "price"]) +df.head() +print(df) +while True: + print("***********************") + print('0...退出选择') + print('1...输入选择') + print("***********************") + menuId=eval(input("是否查询(输入数字):")) + if menuId==1: + riqi=input('请输入要查询的日期(如2022-12-01):') + df1=df[df.date==riqi] + print(df1) + elif menuId==0: + break \ No newline at end of file