The new Form feature in Google Colaboratory

后端 未结 5 777
你的背包
你的背包 2021-01-02 05:59

Can someone explain or give a notebook example how to use the new Form feature? It looks really exciting, but I cannot find any example or even an announcement anyw

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-02 06:43

    Exciting feature indeed. It seems we can use checkboxes and date fields:

    boolean_checkbox = True #@param {type:"boolean"}
    date_input = '2018-03-22' #@param {type:"date"}
    

    but I would really love to be able to construct dropdown lists using existing variables. Currently this seems limited:

    dropdown = '1st option' #@param ["1st option", "2nd option", "3rd option"]
    

    To be clear I'd love to be able to write

    countries = df['country'][0] #@param df.country.unique()
    

    Anyone?

提交回复
热议问题