Skip to content

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…

Trying to detect speech using VAD(Voice Activity Detector)

I am able to read the audio but I am getting an error message while passing it to VAD(Voice Activity Detector). I think the error message is because the frames is in bytes, when feeding it to vad.is_speech(frame, sample_rate), should this frame be in bytes? Here is the code below: Here is the error message: T…

File on Python (os.startfile) can’t be opend

I have a file in which search results (paths) are saved. I only want the very first result to be opend. I did this with: The print result is: O:/111/222/test_99.zip’ But the error is: FileNotFoundError: [WinError 2] system cannot find the file specified: O:/111/222/test_99.zip’ An addition: O: Is …