(a) Create a DataFrame df1 using a dict with country and medal as the keys and the two lists as corresponding values: ['United States', 'Great Britain', 'China', 'Russia', 'Germany', 'France', 'Japan'] and [121, 67, 70, 56, 42, 42, np.nan].
(b) Show the head of the DataFrame df1.
(c) Create another DataFrame df2 using the above dict, but with columns in the order ['medal', 'country', 'gold']. Display df2. See how gold column is filled with missing values.
(d) Retrieve the column country from the dataframe df2 using the dict-like notation. Check the type of the column.
(e) Retrieve the column country from the dataframe df2 using attribute notation.
(f) Create yet another DataFrame df3 using a different approach.
First create 2 lists country and medal as follows:
Second, create a list of column labels called labels_list: ['country', 'medal']. Third, create another list columns_list which has 2 list items country and medal: [country, medal]. Next, create a dict using zipped lists labels_list and columns_list, and finally make a DataFrame df3 out of it. Then assign country as the index of the DataFrame. Display the dataframe df3.
(g) Practice again. Create another DataFrame with 3 elements using the approach in part (f).
Please help! This is a programming exercise for Python.
(a) Create a DataFrame df1 using a dict with country and medal as the keys and...
The Rio data set includes the top 10 medal winning countries from the Rio 2016 Olympics and how many total medals they won. The data set can be found in the excel file Rio with a variable Medal. Use RStudio to create a frequency and relative frequency distribution of the variable Medal. Combine both of these distributions in a single table. Use RStudio to create a frequency bar graph of the medal data. Label the axes properly. Describe the distribution...
Which country first succeeded in opening Japan to trade and western influence in the nineteenth century? a. United States b. Britain c. Russia d. China The Sepoy Rebellion was the result of a. their opposition to the practice of sati, which was continued by the British b. the Indian citizens who opposed British rule; the culmination being a rumor that the Sepoys were using cow fat to grease their bullets c. tensions between the Sepoys and the British; the culmination...
PYTHON PROGRAM
by using functions & dictionary or set.
- must create a variable to hold a dictionary or sets
- must define a function that accepts dictionaries or sets as an
argument
A dictionary maps a set of objects (keys) to another set of objects (values). A Python dictionary is a mapping of unique keys to values. For e.g.: a dictionary defined as: released = { "iphone" : 2007, "iphone 3G": 2008, "iphone 3GS": 2009, "iphone 4" : 2010,...
Please help me answer theses practice questions
QUESTION 2 Which of the following can a country implement to protect local industries (e.g. bicycles) according to the video on the deceptive promise of free trade? Border walls local training programs to strengthen local industries protectionist policies such as tarrifs creating a high minimum wage locally governments can't do anything QUESTION 3 Which of the following European countries has a trade surpluse with the US as well as most other European countries...
PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create the schema, and package. 2. Create users x1 and x2 who are the participants in the auction. They will need acces to the package. 3. Bid on the same item and record your observations. Verify all scenarios. Upload the files with the missing code and a detailed sample run. AUCTION OWNER.TXT SQL> conn / as sysdba Connected. SQL> drop user xyz cascade; User dropped....
Develop a case study analysis in the following format
Relevance of the case study to my work
environment
- application
- learning impact
CASE 4-1 Tambrands Overcoming Cultural Resistance Tampax, Tambrands's only product, is the best-selling tampon in their virginity if they use a tampon. When they go to the beach in the world, with 44 pencent of the global market North America and tiny bikinis, tampons arent their choike. Instead, hordes of women Europe account for 90 percent of...
FISCAL POLICY IN THEORY: March, 2020: we are on the verge of Congress and the President passing legislation that will empower the federal government to spend an unprecedented amount of EXTRA money not seen since World War 2 ---- in order to address the pandemic but also to help cushion the blow financially of perhaps ten or twenty million Americans --- or more --- losing their jobs, and thus suffering a drop in income. The scale of the 2020 recession...