(1) Choose an infinite countable set of irrational numbers in $(0,1)$, call them $(r_n)_{n\geqslant0}$.
(2) Enumerate the rational numbers in $(0,1)$ as $(q_n)_{n\geqslant0}$.
(3) Define $f$ by $f(q_n)=r_{2n+1}$ for every $n\geqslant0$, $f(r_n)=r_{2n}$ for every $n\geqslant0$, and $f(x)=x$ for every irrational number $x$ which does not appear in the sequence $(r_n)_{n\geqslant0}$.
Let me suggest you take it from here and show that $f$ is a bijection between $(0,1)$ and $(0,1)\setminus\mathbb Q$.
Hint: Fix $a_n$ as a sequence of irrational numbers, and write $\mathbb Z=\{z_n\mid n\in\mathbb N\}$. Define a function which sends $a_n$ to $a_{2n}$; $z_n$ to $a_{2n+1}$; and $x$ to itself otherwise.
Best Answer
Choose an irrational number $\alpha$.
Let $x_1, x_2, \ldots$ be a strictly increasing sequence of rational numbers that converge towards $\alpha$.
Let $y_1, y_2, \ldots$ be a strictly decreasing sequence of rational numbers that converge towards $\alpha$.
Then define $f:\mathbb Q\to\mathbb Q\setminus\{0\}$ as: