All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
What is the primary function of the pd.concat()
method in pandas?
Concatenate DataFrames for movies released in even
and odd
years to analyse trends based on year. Use the Release Year
column to filter the data.
Store the result in concatenated_years
variable.
The result should match the following output :
Concatenate DataFrames for movies directed by Blake Edwards
and Zachary Shedd
to compare their works. Use the Director
column to filter the data.
Store the result in concatenated_directors
variable.
The result should match the following output :
Create DataFrames for movies released in the 1990
s and 2000
s. Concatenate them to analyze trends over these decades using the Release Year
column.
Store the result in concatenated_decades
variable.
The result should match the following output :
Concatenate rows of historical films (pre-1970)
and recent films (post-2010)
to compare trends across eras using the Release Year
column.
Store the result in historical_recent
variable.
The result should match the following output :
Concatenate the Locations
and Fun Facts
columns side by side to create a combined view of film locations and their fun facts.
Store the result in locations_fun_facts
variable.
The result should match the following output :
Concatenate the Release Year
and Locations
columns side by side to see the release years of movies along with their filming locations.
Store the result in year_location
variable.
The result should match the following output :
Extract Director
and Writer
columns and concatenate them to explore frequent collaborations in the film industry.
Store the result in director_writer_pairs
variable.
The result should match the following ouptut :
Extract the Actor 1
, Actor 2
, and Actor 3
columns and concatenate them to create a comprehensive list of actors.
Store the result in actors
variable.
The result should match the following output :
Create a Series by concatenating Director
names directly with Title
to form listings in this format: "Director Name
, directed Title
".
Store the result in directed_titles
variable.
The result should match the following output :
Group by Title
and calculate the count of unique filming Locations
per title.
Enter the number of unique location counts across all films.
Find the top 5 and bottom 5 most filmed locations and concatenate their records to analyze differences.
Store the result in concatenated_locations
variable.
The result should match the following output :
Differentiate films shot in distinctly urban settings from those shot in natural or park-like settings within San Francisco.
Filter records by Locations
containing keywords like Financial District
and Golden Gate Park
.
Store the result in urban_natural_sets
variable.
The result should match the following output :