dataframe:  data = {"Category":["Resource","Resource","Resource","Resource"],     "Item1":["Bandwidth","Bandwidth","Bandwidth","Bandwidth"],     "Item2":["DC","OC","DC","OC"],     "Amount":[156.415,396.921,-156.415,-396.921]} df = pd.DataFrame(data)  df = df.groupby(["Category","Item1"],as_index=False).sum() print df   get the result:     Category      Item1        Amount 0  Resource  Bandwidth  5.684342e-14   Why Amount not zero?How can I get the right result?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
An inequality from Littlewood's Miscellany Split a file by line and have control over resulting files extension Change the order of integration in:  $$\int_0^{2a}\int_0^\sqrt{2ax-x^2}\frac{\phi'(y)(x^2+y^2)x }{\sqrt{4a^2x^2-(x^2+y^2)^2}}dxdy$$ and hence evaluate it.    I changed the order of integration and got the limits $y=0$ to $a$ and $x=a-\sqrt{a^2-y^2}$ to $a+\sqrt{a^2-y^2}$. I then tried changing to polar coordinates, but it is only making the integrand more complex. Why does blowing on someone who is wet feel colder than on someone who is dry? Proper way to exit iPhone application? I am programming an iPhone app, and I need to force it to exit due to certain user actions.  After cleaning up memory the app allocated, what's the appropriate method to call to terminate the application? Show alert popup on standard page layout on click of standard button "Save" Let $G$ be a group and $H$ be a subgroup of $G$ of index $2$ .Then show that if $a,b\notin H$ then $ab\in H$. Born rule and unitary evolution Is the  a fundamental , or can it be inferred from unitary evolution? Syntax of bash alias definition I'm using Cygwin, and have installed all the developer packages as well as most if not all of the other packages. When I provide an alias for gcc, I get the error  -bash: alias: gcc: not found   What could I be doing wrong?  I am typing the following command into the terminal:  alias gcc "gcc -ansi -Wall -g -O0 -Wwrite-strings -Wshadow -pedantic-errors -fstack-protector-all"   FYI, this alias works on other systems. Prove $\sum{\frac{1}{(x+2y)^2}} \geq\frac{1}{xy+yz+zx}$ Whoa! What is this "Linked" thing? As per the title, what is this new feature? Can I secretly kill every guard in a town? Is it possible to kill all of the guards in a town?  Ideally, I'd like to do this secretly so the entire town doesn't see my deeds and put a bounty on my head.  Edit: I was questing in Markarth and was told by a guard to back off and stop being nosy. I didn't and when I went to the Shrine of Talos I was set upon by a bunch of guards.  Now I have a huge bounty and I had to sneak/kill my way out of the city.  Every time I killed a group of guards the bounty was reduced by $1000, but I still have a $30,000 bounty.  I haven't even been through 1/3 of the city yet and know there has to be a lot of quests, so what do I do?  The only solution seems to kill every single guard (and inhabitant). Why aliases in a non-interactive Bash shell do not work If $U_1$, $U_2,\ldots,U_n$ are proper subspaces of a vector space $V$ over a field $F$, and $|F|\gt n-1$, why is $V$ not equal to the union of the subspaces $U_1$, $U_2,\ldots,U_n$? Use "does" in front of another verb in a question? What time does sound good to you?     What time sounds good to you?    Is there a difference? How do I connect to my Bluetooth headset? I have an ACER C7 Chromebook with Ubuntu 12.04 installed.  Also I have two apps installed Bluetooth Manager and Bluetooth.    I am trying to connect an  to Ubuntu. I have tried to set up the new device and pair, but the headset is never recognized.  I checked hard and soft setting for Bluetooth and they are on.  I am new to Ubuntu 12.04 and Linux and need specific instructions. Variance of a bounded random variable Suppose that a random variable has a lower and an upper bound [0,1]. How to compute the variance of such a variable? I'm completing a problem set, one problem for which I literally have no idea what to do on. The graders would prefer to have a physical copy of the problem so I thought it best to include the ¯\_(ツ)_/¯ emoji as my answer, instead of something like "Dunno" or "No idea."  Option #1 is to include an image.  Beyond that I actually don't understand how this emoji works. The middle character is Japanese kana "tsu" and proves problematic - TeX wants it in math mode then renders "?" when it is. When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approach to mining.  What is the optimal mining strategy that yields the most rare minerals while minimizing blocks removed and time spent digging and traveling?  Edit: The existing answers are great for mining, but no one has addressed travel time to and from the mine which is usually ~60 blocks downward and incredibly tedious. Solutions? I am reading a paper and have questions about the details of the procedure described. I have read other papers by the same team but they don't explain too much about that procedure anyway. I think it might be common, but my supervisor doesn't know it too.  I am stuck and I want to get out of it. As a student working on my master thesis, can I email the contact author for the manuscript cold out, or should I ask someone to contact him for me? I would ask my supervisor but I don't want it to imply that I'm avoid taking initiatives when I could do it on my own.