Where to put download button for downloading contents of table?

So I have a pretty regular table with data in it and I also have a download button that, when clicked, downloads the contents of the table to the browser as a csv file. My question is where should I put that download button in relation to the table? Above the table? Below the table? The top right corner of the table? Is there any rule here for the correct placement of a download button?