We can get the character table for a finite group using the .character_table() method. As an example:
G = SymmetricGroup(3)
G.character_table()
Returns
[ 1 -1 1]
[ 2 0 -1]
[ 1 1 1]
which are the signed, two-dimensional and trivial irreps, respectively (see wiki page on character tables, unfortunately can't post links yet). The columns are identity, (12) and (123) conjugacy classes. As another example, for the case of G = CyclicPermutationGroup(3), the character table returns
[ 1 1 1]
[ 1 zeta3 -zeta3 - 1]
[ 1 -zeta3 - 1 zeta3]
where the columns are identity, (123) and (132) group elements. Assuming this information is generally unknown, how can I determine which columns correspond to which conjugacy classes/group elements solely based on the sagemath functionality?