CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 235 forks source link

pandas selection option #134

Closed znd4 closed 3 years ago

znd4 commented 3 years ago

Hi y'all, thanks for the awesome project!

This idea isn't fully-formed yet, but I'm wondering what you'd think about the addition of a pandas selection option in inquirer. I'm thinking that the invocation would be something like:

inquirer.pandas("name", choices = df)

Then there'd be a display of the dataframe, and the user could type in a text to filter the records (across all columns? the selected column? not quite sure about that). Also, it'd probably be reasonable for users to be able to hit left-right to select columns, then Enter to sort based on that column (Enter again to switch descending, ascending)

As I'm typing this out, it's obviously a big project, so this isn't really a feature request. I'm wondering if it makes sense to try to implement this in inquirer, or if I should try creating this as a standalone thing first.

Thanks, sorry for the long question

znd4 commented 3 years ago

Hmm, I just realized that pandas is probably a huge dependency to add just for this feature, so it'd probably be better to try to implement this as a plugin, or as an entirely separate project. I'm gonna close this for now