Mining stocks have fallen out of favour over the last month, with the sector down by one-seventh, and this has encouraged brokers Investec and Citigroup to advise clients to look at the sector for bargains.Investec has upgraded BHP Billiton and Rio Tinto from "hold" to "buy" in the wake of share price weakness. Rio, having risen above £25 in June, is now trading below £20 while BHP Billiton is more than £2 below the high point achieved in June of just over £15.The broker is less bullish about the prospects of platinum producers, and also has doubts about Anglo American which is highly exposed to the buoyant South African rand.Citi also likes Rio, which it identifies as its favoured play in the sector. It has raised its target price for the stock from £28.10 to £29, after a review of the sector which resulted in Citi's commodities team upgrading their commodity price forecasts.The US bank has upgraded Antofagasta and Vedanta from "sell" to "hold". Citi has upped its price target for ENRC from 720p to 750p but trimmed its price target for Lonmin from £13.85 to £11.90.