• Text mining with Python

    In my last post, I introduced the method I am employing for the qualitative discourse analysis of my interviews. Here, I want to introduce some of the tools I have used to build my script. Reading multiple .txt files All interview transcriptions were saved as .txt files and read into Python using the os and pandas packages. Saving the main directory (containing all interview files) address as a variable, I could easily extract all files from the directory with the correct format name like this: Removing punctuation and irrelevant breaks To remove excess spacing and irrelevant punctuation, each interview content is converted into a giant string and I simply used…