未处理的类型' System.ArgumentException'发生在mscorlib.dll中,附加信息:该路径不是合法格式。仅在关闭窗口后第二次按下错误后才会出现错误。
Heres代码:
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog OpenFd = new OpenFileDialog();
OpenFd.Filter = "Images only. |*.jpg; *.jpeg; *.png; *.gif;";
DialogResult dr = OpenFd.ShowDialog();
pictureBox1.Image = Image.FromFile(OpenFd.FileName);
ItemUrl.Text = OpenFd.FileName;
}
答案 0 :(得分:0)
您需要处理是否在FileDialog上选择了图像或点击了“取消”。请改用此格式:
pd.pivot_table(
df,
values='COUNT',
index=['B'],
columns=['E'],
margins=True,
aggfunc=np.sum
)