我有这段代码,当在cmd上运行时可以,但是如果单击Python图标,它将立即运行并关闭。
为什么输入没有保持打开状态?
# -*- coding: utf-8 -*-
import pandas as pd
a=pd.read_csv(r"C:\Users\user\Desktop\file.txt", sep=",")
b=a[['dates','user']]
print(b.groupby(['dates','user'])['dates'].count().sort_index(level=[0,1], ascending=[False,True]))
input('write something')