Question
Pandas: Subset the August data into a new dataframe. Display the average values for Wednesdays in August. What is the highest closing price in August
Pandas:
- Subset the August data into a new dataframe. Display the average values for Wednesdays in August.
- What is the highest closing price in August on a day that is NOT Wednesday?
data:
Date,Open,High,Low,Close,Volume 6/7/2018,190.75,190.970001,186.770004,188.179993,21503200 6/8/2018,187.529999,189.479996,186.429993,189.100006,12677100 6/11/2018,188.809998,192.600006,188.800003,191.539993,12928900 6/12/2018,192.169998,193.279999,191.559998,192.399994,11562700 6/13/2018,192.740005,194.5,191.910004,192.410004,15853800 6/14/2018,193.100006,197.279999,192.910004,196.809998,19120900 6/15/2018,195.789993,197.070007,194.639999,195.850006,21860900 6/18/2018,194.800003,199.580002,194.130005,198.309998,16826000 6/19/2018,196.240005,197.960007,193.789993,197.490005,19994000 6/20/2018,199.100006,203.550003,198.809998,202,28230900 6/21/2018,202.759995,203.389999,200.089996,201.5,19045700 6/22/2018,201.160004,202.240005,199.309998,201.740005,17420200 6/25/2018,200,200,193.110001,196.350006,25275100 6/26/2018,197.600006,199.100006,196.229996,199,17897600 6/27/2018,199.179993,200.75,195.800003,195.839996,18734400 6/28/2018,195.179993,197.339996,193.259995,196.229996,18172400 6/29/2018,197.320007,197.600006,193.960007,194.320007,15811600 7/2/2018,193.369995,197.449997,192.220001,197.360001,13961600 7/3/2018,194.550003,195.399994,192.520004,192.729996,13489500 7/5/2018,194.740005,198.649994,194.029999,198.449997,19684200 7/6/2018,198.449997,203.639999,197.699997,203.229996,19740100 7/9/2018,204.929993,205.800003,202.119995,204.740005,18149400 7/10/2018,204.5,204.910004,202.259995,203.539993,13190100 7/11/2018,202.220001,204.5,201.75,202.539993,12927400 7/12/2018,203.429993,207.080002,203.190002,206.919998,15454700 7/13/2018,207.809998,208.429993,206.449997,207.320007,11486800 7/16/2018,207.5,208.720001,206.839996,207.229996,11078200 7/17/2018,204.899994,210.460007,204.839996,209.990005,15349900 7/18/2018,209.820007,210.990005,208.440002,209.360001,15334900 7/19/2018,208.770004,209.990005,207.759995,208.089996,11350400 7/20/2018,208.850006,211.5,208.5,209.940002,16163900 7/23/2018,210.580002,211.619995,208.800003,210.910004,16732000 7/24/2018,215.110001,216.199997,212.600006,214.669998,28468700 7/25/2018,215.720001,218.619995,214.270004,217.5,58954200 7/26/2018,174.889999,180.130005,173.75,176.259995,169803700 7/27/2018,179.869995,179.929993,173,174.889999,60073700 7/30/2018,175.300003,175.300003,166.559998,171.059998,65280800 7/31/2018,170.669998,174.240005,170,172.580002,40356500 8/1/2018,173.929993,175.080002,170.899994,171.649994,34042100 8/2/2018,170.679993,176.789993,170.270004,176.369995,32400000 8/3/2018,177.690002,178.850006,176.149994,177.779999,24763400 8/6/2018,178.970001,185.789993,178.380005,185.690002,49716200 8/7/2018,186.5,188.300003,183.720001,183.809998,33398600 8/8/2018,184.75,186.850006,183.759995,185.179993,22205200 8/9/2018,185.850006,186.570007,182.479996,183.089996,19732100 8/10/2018,182.039993,182.100006,179.419998,180.259995,21500400 8/13/2018,180.100006,182.610001,178.899994,180.050003,17423300 8/14/2018,180.710007,181.990005,178.619995,181.110001,19102000 8/15/2018,179.339996,180.869995,174.779999,179.529999,33020200 8/16/2018,180.419998,180.5,174.009995,174.699997,31351800 8/17/2018,174.5,176.220001,172.039993,173.800003,24893200 8/20/2018,174.039993,174.570007,170.910004,172.5,21518000 8/21/2018,172.809998,174.169998,171.389999,172.619995,19578500 8/22/2018,172.210007,174.240005,172.130005,173.639999,16894100 8/23/2018,173.089996,175.550003,172.830002,172.899994,18053600 8/24/2018,173.699997,174.820007,172.919998,174.649994,14631600 8/27/2018,175.990005,178.669998,175.789993,177.460007,17921900 8/28/2018,178.100006,178.240005,175.830002,176.259995,15910700 8/29/2018,176.300003,176.789993,174.75,175.899994,18494100 8/30/2018,175.899994,179.789993,175.699997,177.639999,24216500 8/31/2018,177.149994,177.619995,174.979996,175.729996,18065200 12/27/2018,132.440002,134.990005,129.669998,134.520004,31202500 12/28/2018,135.339996,135.919998,132.199997,133.199997,22627600 12/31/2018,134.449997,134.639999,129.949997,131.089996,24625300 1/2/2019,128.990005,137.509995,128.559998,135.679993,28146200 1/3/2019,134.690002,137.169998,131.119995,131.740005,22717900 1/4/2019,134.009995,138,133.75,137.949997,29002100 1/7/2019,137.559998,138.869995,135.910004,138.050003,20089300 1/8/2019,139.889999,143.139999,139.539993,142.529999,26263800 1/9/2019,142.949997,144.699997,141.270004,144.229996,22205900 1/10/2019,143.080002,144.559998,140.839996,144.199997,16125000 1/11/2019,143.149994,145.360001,142.570007,143.800003,12908000 1/14/2019,142,146.570007,141.270004,145.389999,20520300 1/15/2019,146.009995,150.679993,145.990005,148.949997,24069000 1/16/2019,149,149.649994,147,147.539993,18025700 1/17/2019,146.949997,149,146.5,148.300003,15787900 1/18/2019,149.75,152.429993,148.550003,150.039993,31029600 1/22/2019,149.199997,151.529999,146.369995,147.570007,22378700 1/23/2019,148.279999,148.800003,143.059998,144.300003,20098400 1/24/2019,144.639999,146.440002,142.520004,145.830002,20955500 1/25/2019,147.479996,149.830002,146.539993,149.009995,22237200 1/28/2019,148.050003,148.960007,146.210007,147.470001,15508500 1/29/2019,148.089996,148.100006,143.429993,144.190002,17632100 1/30/2019,146.220001,150.949997,145.699997,150.419998,44613200 1/31/2019,165.600006,171.679993,165,166.690002,77233600 2/1/2019,165.839996,169.100006,165.660004,165.710007,30806500 2/4/2019,165.699997,169.300003,163.619995,169.25,20036000 2/5/2019,169.149994,171.979996,168.690002,171.160004,22557000 2/6/2019,171.199997,172.470001,169.270004,170.490005,13281200 2/7/2019,168.199997,169.240005,165.25,166.380005,17517600 2/8/2019,164.470001,167.369995,164.210007,167.330002,12561400 2/11/2019,167.899994,168.300003,165.080002,165.789993,12811200 2/12/2019,166.860001,168.339996,164.5,165.039993,16292300 2/13/2019,165.380005,166.220001,163.729996,164.070007,14205100 2/14/2019,163.190002,164.869995,162.25,163.949997,12755200 2/15/2019,164.509995,164.699997,160.860001,162.5,15504400 2/19/2019,160.5,164.149994,160.330002,162.289993,14345400 2/20/2019,162.25,163.720001,161.25,162.559998,11770700 2/21/2019,161.929993,162.240005,159.589996,160.039993,15607800 2/22/2019,160.580002,162.410004,160.309998,161.889999,15858500 2/25/2019,163.070007,166.070007,162.899994,164.619995,18737100 2/26/2019,164.339996,166.240005,163.800003,164.130005,13784100 2/27/2019,162.899994,163.929993,160.410004,162.809998,12697500 2/28/2019,162.369995,163.5,160.860001,161.449997,11114200 3/1/2019,162.600006,163.130005,161.690002,162.279999,11097800 3/4/2019,163.899994,167.5,163.830002,167.369995,18894700 3/5/2019,167.369995,171.880005,166.550003,171.259995,28187900 3/6/2019,172.899994,173.570007,171.270004,172.509995,21531700 3/7/2019,171.5,171.740005,167.610001,169.130005,18306500 3/8/2019,166.199997,169.619995,165.970001,169.600006,13184800 3/11/2019,171.600006,174.300003,171.580002,172.070007,18884000 3/12/2019,172.089996,173.800003,171.220001,171.919998,12155300 3/13/2019,172.320007,174.029999,172.119995,173.369995,11973300 3/14/2019,169.759995,171.149994,168.160004,170.169998,18037400 3/15/2019,167.160004,167.580002,162.509995,165.979996,37135400 3/18/2019,163.570007,163.899994,159.279999,160.470001,37524200 3/19/2019,161.479996,163.820007,160.820007,161.570007,25611500 3/20/2019,161.5,166.119995,161.240005,165.440002,20211500 3/21/2019,164.889999,166.389999,163.75,166.080002,16223000 3/22/2019,165.649994,167.419998,164.089996,164.339996,16389200 3/25/2019,163,166.539993,162,166.289993,12631200 3/26/2019,167.350006,169.449997,166.350006,167.679993,15437900 3/27/2019,167.850006,168.940002,164.789993,165.869995,10620300 3/28/2019,164.570007,166.720001,163.330002,165.550003,10443000 3/29/2019,166.389999,167.190002,164.809998,166.690002,13455500 4/1/2019,167.830002,168.899994,167.279999,168.699997,10381500 4/2/2019,170.139999,174.899994,169.550003,174.199997,23946500 4/3/2019,174.5,177.960007,172.949997,173.539993,27391100 4/4/2019,176.020004,178,175.529999,176.020004,17847700 4/5/2019,176.880005,177,175.100006,175.720001,9594100 4/8/2019,175.210007,175.5,174.229996,174.929993,7297400 4/9/2019,175.619995,179.190002,175.550003,177.580002,19751000 4/10/2019,178.179993,178.789993,176.539993,177.820007,11701500 4/11/2019,178.240005,178.399994,177,177.509995,8071000 4/12/2019,178,179.630005,177.949997,179.100006,12329800 4/15/2019,178.5,180.5,176.869995,179.649994,10834800 4/16/2019,179,180.169998,178.300003,178.869995,11215200 4/17/2019,179.600006,180.740005,178.360001,178.779999,9973700 4/18/2019,178.800003,178.880005,177.339996,178.279999,11655600 4/22/2019,178.25,181.669998,178.25,181.440002,13389900 4/23/2019,182.740005,184.220001,181.479996,183.779999,19954800 4/24/2019,184.490005,185.139999,181.649994,182.580002,37289900 4/25/2019,196.979996,198.479996,192.119995,193.259995,54148800 4/26/2019,192.5,192.899994,189.089996,191.490005,22075000 4/29/2019,190.949997,195.410004,190.649994,194.779999,19641300 4/30/2019,194.190002,197.389999,192.279999,193.399994,23494700 5/1/2019,194.779999,196.179993,193.009995,193.029999,15996600 5/2/2019,193,194,189.75,192.529999,13209500 5/3/2019,194.380005,196.160004,193.710007,195.470001,14575400 5/6/2019,191.240005,194.279999,190.550003,193.880005,13994900 5/7/2019,192.539993,192.899994,187.850006,189.770004,16253000 5/8/2019,189.389999,190.720001,188.550003,189.539993,12505700 5/9/2019,187.199997,189.770004,186.259995,188.649994,12967000 5/10/2019,188.25,190,184.589996,188.339996,12578500 5/13/2019,183.5,185.429993,180.839996,181.539993,16833300 5/14/2019,182.520004,183.490005,178.100006,180.729996,17628100 5/15/2019,180.419998,187.279999,180.020004,186.270004,16746900 5/16/2019,185.050003,188.580002,185.050003,186.990005,12953100 5/17/2019,184.839996,187.580002,184.279999,185.300003,10485400 5/20/2019,181.880005,184.229996,181.369995,182.720001,10352000 5/21/2019,184.570007,185.699997,183.889999,184.820007,7502800 5/22/2019,184.729996,186.740005,183.610001,185.320007,9213800 5/23/2019,182.419998,183.899994,179.669998,180.869995,12768800 5/24/2019,182.330002,183.630005,180.830002,181.059998,8807700 5/28/2019,181.539993,184.710007,181.449997,184.309998,14843300 7/17/2019,204.179993,204.360001,201.589996,201.800003,12083700 7/18/2019,200.149994,202.470001,199.380005,200.779999,11937900 7/19/2019,202.179993,202.330002,198.070007,198.360001,12098300 7/22/2019,199.910004,202.570007,198.809998,202.320007,13589000 7/23/2019,202.839996,204.240005,200.960007,202.360001,14583700 7/24/2019,197.630005,204.809998,197.220001,204.660004,32532500 7/25/2019,206.699997,208.660004,198.259995,200.710007,39889900 7/26/2019,200.190002,202.880005,196.25,199.75,24434000 7/29/2019,199,199.630005,195.300003,195.940002,16530800 7/30/2019,195.389999,198.710007,193.5,197.039993,11903600 7/31/2019,196.949997,198.759995,192.679993,194.229996,14593500 8/1/2019,194.169998,198.470001,190.880005,192.729996,17777000 8/2/2019,191.100006,192.619995,188.070007,189.020004,15297000 8/5/2019,184.690002,185.669998,179.339996,181.729996,23086700 8/6/2019,183.690002,185.789993,183.089996,184.509995,18035700 8/7/2019,183.600006,186.369995,181.220001,185.149994,15833200 8/8/2019,186.619995,190.339996,184.050003,190.160004,14828900 8/9/2019,190,190.979996,187.119995,187.850006,11058800 8/12/2019,186.850006,187.589996,184.460007,185.369995,10936300 8/13/2019,185.520004,191.380005,185.369995,188.449997,13577000 8/14/2019,185.800003,185.990005,179.309998,179.710007,18903700 8/15/2019,180.949997,183.199997,180.029999,182.589996,12925900 8/16/2019,183.75,185.100006,182.360001,183.699997,12654600 8/19/2019,186.009995,187.5,184.850006,186.169998,9691200 8/20/2019,185.449997,186,182.389999,183.809998,10083400 8/21/2019,185,185.899994,183.139999,183.550003,8398200 8/22/2019,183.429993,184.110001,179.910004,182.039993,10821400 8/23/2019,180.839996,183.130005,176.660004,177.75,17323400 8/26/2019,179.399994,180.5,178.240005,180.360001,8773600 8/27/2019,181.929993,184.039993,181.009995,181.300003,14399600 8/28/2019,180.529999,181.949997,178.919998,181.759995,9386100 8/29/2019,183.770004,186.080002,183.470001,185.570007,10128700 8/30/2019,186.779999,186.800003,183.460007,185.669998,10774500 9/3/2019,184,185.669998,182.110001,182.389999,9779400 9/4/2019,184.649994,187.75,183.889999,187.139999,11308000 9/5/2019,188.529999,191.360001,187.940002,190.899994,13876700
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