Question
Creating DataFrames ... 1. Create a DataFrame object named DF_RAL_CLT with two columns using the two Series objects created for you (below): RAL_TEMPS and CLT_TEMPS.
Creating DataFrames ...
1. Create a DataFrame object named DF_RAL_CLT with two columns using the two Series objects created for you (below): RAL_TEMPS and CLT_TEMPS.
Give them column names of 'Raleigh' and 'Charlotte'.
2.Set variable RAL to the column of DF_RAL_CLT with the name 'Raleigh'
3.Set variable CLT to the column of DF_RAL_CLT with the name 'Charlotte' YOU MUST USE 'dot' syntax to reference the column name!!!
4.Create DF_CLT_RAL containing both columns in DF_RAL_CLT in the reverse order [Charlotte column 1st and Raleigh column 2nd]
################################################################################ # THIS CODE IS PROVIDED FOR YOU -- JUST RUN IT TO CREATE 2 SERIES OBJECTS!!! ################################################################################ RALEIGH_AUG_2022 = [92, 94, 94, 95, 94, 93, 93, 95] CHARLOTTE_AUG_2022=[85, 92, 94, 93, 91, 91, 92, 93] INDEX_DATES = pd.date_range ('2022-08-01', '2022-08-08') RAL_TEMPS = pd.Series(RALEIGH_AUG_2022,index=INDEX_DATES) CLT_TEMPS = pd.Series(CHARLOTTE_AUG_2022,index=INDEX_DATES) #print("RAL_TEMPS: ", RAL_TEMPS) #print("CLT_TEMPS: ", CLT_TEMPS)
# DO NOT MODIFY !!! print(" DATAFRAME DF_RAL_CLT ", DF_RAL_CLT) print(" RALEIGH ", RAL, sep='') print(" CHARLOTTE ", CLT, sep='') print(" DATAFRAME DF_CLT_RAL ", DF_CLT_RAL)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started