find and replace with sed

Replacing characters in a text file

$ cat sample.txt
John,28,Engineer,Manager,
Anna,23,Analyst,Associate,
Jenna,29,Data Science,Manager,
Tom,20,Engineer,Intern 

Replacing delimiter in a text file

$ sed 's/,/|/g' sample.txt
John|28|Engineer|Manager|
Anna|23|Analyst|Associate|
Jenna|29|Data Science|Manager|
Tom|20|Engineer|Intern