Ring of integers in p-adic field How do we compute the ring of integers in a finite extension of $\mathbb{Q}_p$? Say, for example, in $\mathbb{Q}_p(i)$. Over $\mathbb{Q}$ we would guess $\mathbb{Z}[i]$, compute the discriminant of this $\mathbb{Z}$ module and look for squares dividing it. But squares in $\mathbb{Z}_p$ are slightly more complicated than in $\mathbb{Z}$. 
Is there some easy way to see the ramification degree / the degree of the residue field extension? If this were the case then it would be very easy to write down the valuation on the extension.
 A: In order for this question to stop being considered unanswered, I will copy the above comments by KCd:
"Squares in $\mathbb Z_p$ are simpler than in $\mathbb Z$, not more complicated! Anyway, just knowing the ramification index and residue field degree in general is insufficient. A general answer is in Lang's Algebraic Number Theory (2nd ed.), Prop. 23 on p. 26. Using any uniformizer $\pi$ (which you could check if you know the ramification index) and generator $\gamma$ of the residue field extension (which you could check if you know the residue field degree), the integers of the extension are $\mathbb Z_p[\pi,\gamma]$. If $e=1$ use $\pi=p$, so the ring is $\mathbb Z_p[\gamma]$. If $f=1$ use $\gamma=1$, so the ring is $\mathbb Z_p[\pi]$. As for the special case of $\mathbb Q_p(i)$, the ring of integers is in general $\mathbb Z_p[i]$, even for $p=2$, but notice $\mathbb Z_p[i]=Z_p$ if $p\equiv 1\pmod4$ since $−1$ is a $p$-adic square in that case, so writing the ring of integers as $\mathbb Z_p[i]$ is kind of misleading as to what the ring looks like.
Another thing to be careful about is that you know the degree of your field over $\mathbb Q_p$! For instance, asking about the ring of integers of $\mathbb Q_5(\sqrt[3]{2})$ is ambiguous, because $X^3−2$ has one root in $\mathbb Q_5$ and the other roots are quadratic over $\mathbb Q_5$."
Of course, if KCd wants to reclaim his answer (as I suggested above in the comments), I will gladly delete this CW answer.
