Following up on Tom's answer, there is actually a reason there was a large white minority in South Africa, but not in India.
The Bantu peoples (of which most living native South Africans are descendents) spread across most of Sub-Saharan Africa in large part due to having an agricultural package that worked well for that tropical climate. In particular, millet and sorghum. Indian agriculture was heavily reliant on tropical/subtropical rice and millet crops. European agriculture was heavily reliant on temperate and Mediterranean crops like wheat and barley. Keeping that in mind, look at the world climate mapworld climate map below:
You may notice here that, while India is all tropical and subtropical, South Africa has a lot of Steppe, savannah, and a strip of Mediterranean climate on the south coast. These areas, particularly the southern coast area, are not places where millet and sorghum grow well. That explains why those areas were relatively lighter populated when Europeans arrived; if you can't grow crops there, you can't support the population density associated with an agricultural (rather than herding or hunter-gatherer) society. The fact that their crops grew great there explains why the Europeans themselves found it a great place to emigrate to, and thrived there.