It's very hard for some people. I know a married man that became friends with a female co-worker who pretty much idolized everything he did and it got to the extent it ended his marriage to a woman he had been with for 15 years.
That being said, I have had many female friends and never wanted to take it beyond that because our goal in our friendships was how to best worship God and improve our lives of worship. Also the best is to be a group of friends so you don't get to involved if you don't have that desire and you have other Christians helping to keep everyone accountable.
Also remember, if you are constantly hanging out with someone of the opposite sex almost exclusively, people are taking note and talking about it behind your back even if there is nothing go on.