Communication between Raspberry pi and Arduino

You need to devise some kind of protocol to let the Arduino and Pi understand each other. One simple such thing would be to send your data in packets like this:

<A79.1>

Where '<' is a start of packet indicator and '>' is end of packet. The 'A' identifies which sensor's data is being sent and the 79.1 is the reading the sensor got.

Start of packet is handy because you can read and discard data until you see one. Then read and store until you see the end marker, then parse.

Really though, with something this simple, you can parse as you receive the data. If you choose to buffer it, make sure you don't run out of buffer - i.e. make sure you can cope if the end packet marker is missing or corrupted.