expectedparrot / edsl

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.
https://docs.expectedparrot.com
MIT License
97 stars 14 forks source link

`rename()` should allow lists of names to be changed (in addition to individual values) #702

Open rbyh opened 1 week ago

rbyh commented 1 week ago

Instead of requiring:

old_names = c.question_names

for i in range(len(old_names)): 
    c.rename(old_names[i], new_names[i])

print(c.question_names)
johnjosephhorton commented 1 week ago

I actually did this w/ a rename_dict (?) that lets you pass a dictionary but I'm not in love w/ that and I'd probably prefer having one general purpose rename method...

On Sun, Jun 30, 2024 at 8:52 AM Robin Yerkes Horton < @.***> wrote:

— Reply to this email directly, view it on GitHub https://github.com/expectedparrot/edsl/issues/702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADDNMU2ZHDMWYX4DH2RXO3ZJ75RVAVCNFSM6AAAAABKECUYNSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DEMRUGIYDKMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rbyh commented 1 week ago

Yeah I saw dict but then you need a step changing your list to dict which is not ideal