Selecting

Plays selecting

This section covers the idea of selecting columns from your data. Returning a subset of columns that are relevant to your analysis, making it easier to work with and understand the dataset. This process helps in condensing or minimizing the dataset, reducing its column size to focus on the essential information.

Python - selecting

Code
from datavolley import read_dv
import pandas as pd
from IPython.display import Markdown
dv_instance = read_dv.DataVolley(None) # Replace `None` with path of your dvw file 
df = dv_instance.get_plays()
selected_df = df[['team', 'player_name', 'skill', 'evaluation_code', 'point_won_by']].head(10)
Markdown(selected_df.to_markdown(index = False))
team player_name skill evaluation_code point_won_by
University of Louisville nan nan nan nan
University of Louisville nan nan nan nan
University of Dayton nan nan nan nan
University of Dayton nan nan nan nan
University of Louisville Shannon Shields Serve + University of Louisville
University of Dayton Maura Collins Reception - University of Louisville
University of Dayton Brooke Westbeld Set # University of Louisville
University of Dayton Jamie Peterson Attack - University of Louisville
University of Louisville Anna Stevenson Block + University of Louisville
University of Louisville Shannon Shields Dig + University of Louisville

R - selecting

Code
library(datavolley)
library(dplyr)
x <- dv_read("datavolley//example_data.dvw") # Example data from python
px <- x$plays
selected_px <- px %>% dplyr::select(team, player_name, skill, evaluation_code, point_won_by)
knitr::kable(selected_px %>% head(10))
team player_name skill evaluation_code point_won_by
University of Louisville NA NA NA University of Louisville
University of Louisville NA NA NA University of Louisville
University of Dayton NA NA NA University of Louisville
University of Dayton NA NA NA University of Louisville
University of Louisville Shannon Shields Serve + University of Louisville
University of Dayton Maura Collins Reception - University of Louisville
University of Dayton Brooke Westbeld Set # University of Louisville
University of Dayton Jamie Peterson Attack - University of Louisville
University of Louisville Anna Stevenson Block + University of Louisville
University of Louisville Shannon Shields Dig + University of Louisville