No but in a world of party politics leaving the party you were in when elected should be considered grounds for a bi election.
The basic concept under law is that the people elect a individual person to represent them, not a party. (This goes back to the days when parties were much more approximate and informal groups of politicians, rather than the disciplined, formal organisations of today.) Arguably, as people more vote a party than an individual these days, it is perhaps a little out of date.
I personally believe that any politician with a sense of honour who switches party should resign their seat and go back for a by-election, because switching party shatters the ethical basis of their mandate. But asking politicians to apply personal morality rarely gets very far, which is why the systems overseeing the behaviour of politicians shouldn't rely on personal morality.
To give an example, in a related area:
Conservative justice says he was told ‘personal hospitality’ from mega-donor did not have to be reported, as impeachment calls grow
www.theguardian.com
Leaving aside whether improper access or swaying of opinion occurred, Clarence Thomas can hardly have failed to appreciate how dangerous it is to accept this sort of "personal hospitality", or how it might be perceived by the public. A Supreme Court justice should understand the need to have the highest standards of probity: he has failed to do so and it makes him look greedy and potentially corrupt. Worse, he probably knew exactly how accepting these gifts looked and deliberately wanted to conceal it. It is then sheerest arrogance to think we should be satisfied by just his personal assurance that it did not affect his decision making. We should not be relying on their personal assurances: we should be scrutinising them, very carefully.