IS3240 c/c++,Java

Java Python IS3240-A1
October 12, 2024
IS3240 Homework Assigment #1
1 Q1: Numpy Basics [15%]
1. Import Numpy and Pandas [1%]
2. Create a random number generator, with seed being 99 [2%]
3. Generate a Numpy array (name it as data) with three dimensions in the shape of [10, 4].
All values should be random integers between 0 and 100 (inclusive). [7%]
4. Sort the Numpy array based on the 2nd dimension, from the largest to the smallest. [5%]
2 Q2: Pandas Basics [25%]
1. Read the data HKO.csv
[2%]
• Make the first three columns all integers.
2. Create a new column date using pd.to_datetime so that it contains the year/month/day.
(You need to combine values from three separate columns). [8%]
3. When was the coldest? When was the hottest? [4%]
4. Create a new column season so that Mar-May should be labelled as Spring; Jun-Aug as
Summer; Sep-Nov as Fall; Dec-Feb as Winter. [6%]
5. Compute the average values and standard deviations for the four seasons. [5%]
3 Q3: Finding Ne IS3240、c/c++,Java ws on Tesla using APIs [60%]
You are a financial analyst. You are asked by your manager to identify 50 news articles related
to Tesla in NY Times. Please use Article Search API for this purpose. Specifically, the following
information is needed.
• pub_date: The publish time of this article. Turn this into datetime data type.
1
• abstract: The abstract of this article
• lead_paragraph: The lead paragraph of this article
• web_url: the hyperlink pointing to the article information (e.g., link)
Please acheive the following.
1. Collect 50 news articles. [25%]
2. Which one is the most recent news article? Show the abstract and date of that article. [5%]
3. Find out the new articles which have the longest/shortest abstracts respectively. [10%]
4. Across all the news abstracts, find the the top 10 frequent words. [20%]
• HINT: You need to combine all abstracts, remove all punctuations, and split the text
by space to get a list of words         

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值