Skip to content

Tag: dataframe

Importing count() data for use within bokeh

I am trying to create a visualisation using the bokeh package which I have imported into the Databricks environment. I have transformed the data from a raw data frame into something resembling the following (albeit much larger): From there, I wish to create a line graph using the bokeh package to show the num…

Checking if column headers match PYTHON

I have two dataframes: df1: df2 I want to write a function that checks if the column headers are matching/the same as columns in df1. IF not we get a message telling us what column is missing. Example of the message given these dataframes: I want a generalized code that can work for any given dataframe. Is th…

Extracting Specific Text From column in dataframe

I have the following dataframe and I’m trying to extract the string that has the ABC followed by it’s numbers. Description ABC12345679 132465 Test ABC12346548 Test ABC1231321 4645 I have tried: But its giving me what it comes after on instances that there’s more text after the ABC* like so: …