Canonical Reference: Dhp 78 Verified Source

“Do not associate with unwholesome friends, do not associate with the mean-spirited. Associate with noble and virtuous friends, associate with the best of people.”

Canonical Pali Original: Na bhaje pāpake mitte, na bhaje purisādhame; Bhajetha mitte kalyāṇe, bhajetha purisuttame.

— Gautam Buddha
The Awakened One, Founder of Dhamma
Historical Setting & Context:

Pali Canon: Dhammapada 6.78 on the spiritual importance of Kalyana-mittata (noble friendship).