Depends on why it needs taking out in the first place !
Provided you make an uneventful recovery (6-12weeks depending on surgery), it shouldn't make any difference in your ability to function normally, as regards flying, you shouldn't be at altitude immediately post - op, and I guess your looking at 3months before being in the seat !
Perhaps an expert can clarify !
(There is an AME who works in Cheshire who lectures on this sort of thing and is pretty helpful.)