Skip to content

Tag: pandas

Pandas Column join list values

Using Python, Pandas, I have a couple columns that have lists in them, I want to convert the list to a string. Example:I have the following values in a record, in the field ev_connector_types [u’ACME’, u’QUICK_CONNECT’] I’d like the value for that record to show: ACME, QUICK_CONN…

Pandas group by unique ID and Distinct date per unique ID

Title may be confusing: I have a dataframe that displays user_id sign in’s during the week. My goal is to display the de-duped ID along with the de-duped dates per employee, in order to get a count of # days the user uniquely signed in for the week. So I’ve been trying to enforce a rule to make su…

Uncommon rows based on a column in pandas

Suppose I have two dataframes: and I want to use the second df as reference and drop those rows that exist in df2 from df1, so the result would be I tried: but this gives me the following: Answer Use Series.isin with inverted mask by ~ in boolean indexing, working well if need test only one column: If need te…