You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
# -*- 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
|