What am I?

You throw away my outside you cook my inside. Then you eat my outside and you throw away my inside.