It is better to be alone than in bad company.
It is natural for a man's character and actions to be influenced by his friends and associates and for him to follow the local norms of behavior. Therefore, he should associate with the righteous and be constantly in the company of the wise, so as to learn from their deeds. Conversely, he should keep away from the wicked who walk in darkness, so as not to learn from their deeds.
Do after the good and leave the evil, and it shall bring you to good fame and renown.