From the course: Applied AI for Human Resources
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Preparing network data - Python Tutorial
From the course: Applied AI for Human Resources
Preparing network data
- [Instructor] We will now load the chat groups data and prepare them for consumption by NetworkX. The code for this chapter is available in the notebook code_03_xx Discovering Virtual Teams. Let's run the conda install command to make sure that all required dependent packages are installed in the virtual environment. As discussed in the previous video, we have input data with one record per channel containing multiple employees. We need to reformat and summarize this data set to find employee pairs and the total number of times this pair appears across the dataset. We create a result data frame called Employee Pairs with columns first, second, and count. We will populate this data frame through this exercise. We open the chat groups .csv and read it row by row. For each row we need to extract all the employee pairs out of it. For this we first sort the row and remove any empty names. Then we iterate over each employee,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.