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.
Choose the initial seven rows from the dataframe and assign them to a variable named first_seven_rows
.
This is how your result will look like:
Select the last nine rows of the dataset and store them in a variable named last_nine_rows
.
This is how your result will look like:
Store the selected column in year_df
. Make sure year_df
is a DataFrame. As specified before, try to use .iloc[]
This is how your result will look like:
Store the resulting dataframe in variable named selected_rows_cols
. Remember that indices in Python/Pandas are 0-based, so the 3rd row is indexed as 2
.
This is how your result will look like:
Store the selected column in the variable episodes_df
. Make sure episodes_df
is a DataFrame.
This is how your result will look like:
Extract the popularity scores for all anime between the 200th and 300th entry (including both the 200th and 300th entries) and store them in pop_200_300_df
variable. Remember that indices in Python/Pandas are 0-based, so the 400th row is indexed as 399
.
This is how your result will look like:
This is how your result will look like:
Please enter the number of anime released during the spring season of the year 2022.
Select anime from the options below that have only a single episode.
Select the rows that do not contain a release date and store them in the missing_release_date
.
This is how your result will look like:
Store the resulting dataframe in specific_genre_df
variable.
This is how your result will look like:
We will round the number to the nearest thousand. For example, if the value obtained is 15700, then the rounded value would be 16000.
Store the resulting dataframe in a variable named high_popularity_df
.
This is how your result will look like:
Select the rows based on the above specified condition and store them in less_episode_length_df
variable.
This is how your result will look like:
Please enter the percentage of anime with episodes duration exceeding half an hour, rounded to two decimal points. For example, if the value is 3.4321, then enter 3.43.
Store the resulting dataframe in filtered_year
variable.
This is how your result will look like:
Filter the data to only include anime that were released in 2015 and store them in anime_2015
variable.
This is how your result will look like:
Store the resulting dataframe in a variable named comedy_slice_of_life_df
.
This is how your result will look like:
Please enter the count of anime specifically having ten episode.
Select the anime that have less than 5 episodes and store them in episodes_less_than_five
variable.
This is how your result will look like:
Select the anime which have score equal or above 9 and store them in a variable named high_score_anime
.
This is how your result will look like:
Filter the dataset to only include entries where the Popularity
is greater than 1000 and the Score
is greater than 8.5. Then store the resulting dataframe in filtered_popular_score
variable.
This is how your result will look like:
Filter the dataset to only include anime that were released in and after 2020 and have a popularity score above 9000. Store the resulting dataframe in recent_popular_anime
variable.
This is how your result will look like:
Filter the dataframe to only include entries where the Episodes
is greater than 20 and less than 30, and the Rank
is less than 20. Then store the resulting dataframe in filtered_data
variable.
This is how your result will look like:
Sort the dataframe based on Rank
column in ascending order and store it in sorted_rank_df
variable.
This is how your result will look like:
Sort the dataframe in descending order based on Popularity
column and store the resulting dataframe in popularity_desc_df
variable.
This is how your result will look like:
Sort the dataframe based on two columns Popularity
and Score
in ascending order. Store the result in sorted_pop_score_df
variable.
This is how your result will look like:
Enter the title of the first anime in the sorted dataframe, where the dataframe is sorted in ascending order based on the Genres
column.
Store the resulting dataframe in a variable named df_2017_more_than_20_episodes
.
This is how your result will look like:
Select the anime which were released in either Spring 2009 or Summer 2009 and store them in spring_summer_2009_df
.
This is how your result will look like:
Store the resulting dataframe in a variable named not_act_adv_df
.
This is how your result will look like:
Select the records where the popularity is between 7500 and 8000 (inclusive), then sort them based on popularity in ascending order, and store them in pop_range_sorted_df
.
This is how your result will look like:
Enter the rating of the anime categorized under Drama,Sci-Fi
with the highest value in the 'Rank' column. Remember, in the context of ranks, lower numerical values indicate higher ranks, while higher numerical values indicate lower ranks.
Select the anime that were released between 2017 and 2019 (inclusive), then sort it based on Score
in descending order and store the resulting dataframe in anime_2017_2019_df
.
This is how your result will look like:
Select anime that belong to genre Action,Comedy
, having a popularity score above 50, consisting of fewer than 100 episodes, and released between 2015 and 2019 (inclusive). Sort them based on episode length in ascending order.
This is how your result will look like: