The Buddha shares on the importance of good friendship for a trainee bhikkhu.

Dutiyasekha sutta - Trainee (Second)

This was said by the Blessed One, said by the Arahant, as I have heard:

"Bhikkhus, for a trainee bhikkhu whose mind has not yet attained the unsurpassed security from bondage, who is dwelling and aspiring for it, I do not see any other single external factor as so helpful as good friendship. Bhikkhus, a bhikkhu with good friends abandons the unwholesome and develops the wholesome."

The Blessed One spoke on this matter. In this regard, it is said:

"The bhikkhu who has good friends, who is agreeable and respectful; Acting according to the advice of friends, with full awareness and mindfulness; Gradually attains, the wearing away of all fetters."

This matter too was spoken by the Blessed One, as I have heard.