Just to re-state Joy’s excellent answer in a thousand words and to provide alternatives…
I want to remove my ex-partner as an administrator for my website, but when I do, all her posts get attributed to me, which seems a little unfair.
A post MUST belong to a user. So if you don’t want posts assigned to you, but STILL want to delete your ex-partners’ account, you must create a new user and assign the posts to that new user.
how can I remove her as administrator whilst keeping he name on the posts she wrote?
If you REMOVE a user, then, by the definition, the user is not present in the system. So you cannot assign posts to this non-existing user.
You have three options here:
1) You can KEEP her account, but make her a non-administrator, probably a CONTRIBUTOR and change the associated email address and password. This way, the posts would still be attributed to her, but she can’t log in to make any changes on the site or make new posts. See the different WordPress user roles and capabilities: https://codex.wordpress.org/Roles_and_Capabilities
2) If, for whatever reason, you MUST remove her account completely, you can create a new dummy user and assign those posts to that user. As before, you probably want to make this user a CONTRIBUTOR.
3) If you really want to REMOVE her account and don’t want to create a dummy account to hold her posts, you may assign those posts to yourself, but put an introductory text on top or below each of her posts giving credit to her. You may MANUALLY edit each post and paste some blurb there, or use any of the guest author plugins to do this.