Assuming that you are using the Apple Mail App to access your email, open the email that has the attachment that you wish to save.
Identify the attachment that you wish to save; touch-and-hold the attachment. This should open a small preview window with an associated action menu:

From the action menu, select Save to Files. This will open a new window where you can navigate to where you wish to save your attachment. You can save to a folder in iCloud, locally on your iPad, or to a path on any of your linked cloud services.
Having saved your file, you can open the Files App - and navigate to where you saved the attachment. At top-right of the Files App window, tap the menu icon - and from the menu select View Options. Ensure that Show All Filename Extensions has been enabled:

Having found the saved attachment, touch-and-hold to expose the associated action menu. From the menu, select Rename; manually edit the filename extension from txt to csv.
This of course assumes that the file is, as you have indicated, a csv file with a txt extension.