Using *arg in to assign value to pandas column
Using *arg in to assign value to pandas column Question: I’d like to define a DataFrame using *arg. I want to use the special syntax *args pass a variable number of arguments to a data frame column as follow: import pandas as pd def test(*args): data = pd.DataFrame() for arg in args: data[str(arg)] = arg …