Does changing the host too frequently affect the ranking of the web site in search engines.
For example, if i change the hosting company 3 times in 2 months, does it affect the Page Rank? Because it is changing the server location, and also, each time the website cannot be accessed a few hours.
No moving host is not bad it can be the opposite if it improves your site uptime for example but too frequently hmm could be.
If hosting is good it is positive and if hosting is bad (downtime and slow) that is bad for SEO. So the lack of access isn't good but that can be avoided of course by not changing hosts - but if you keep changing hosts and it keeps repeating every few weeks then this could of course be a different matter and be bad.
upgrading your host will give benefit to your ranking coz faster speed means good ranking. If your changing your host and your website is not available for a couple of days, it could hurt your ranking.
If you are moving from a slower bandwidth and server to a new server. Nope your ranking is going to be better as your load time is reduced. Ip addresses have little to do with ranking unless you are using links form different urls with the same ip addresses.
No, it won't affect your rankings, but it wouldn't hurt to leave your site up on the old host for about a month to ensure that the DNS propagates across the Web and that the search spiders are indexing the pages at the new host. Once you see the spiders in your log files at the new host, it should be safe to take down the site at the old server.