我有2个数据在火花中,如下所述。
val test = hivecontext.sql("select max(test_dt) as test_dt from abc");
test: org.apache.spark.sql.DataFrame = [test_dt: string]
val test1 = hivecontext.table("testing");
其中test1有像id、name、age、audit_dt这样的列
我想比较一下这两个来自test1的数据和过滤行,audit_dt > test_dt,不知怎么的,我无法做到这一点。
下面的代码(当然)只保留“Item1”在按“日期”排序的行中的第一次出现。有什么建议可以让我如何保持它,比如说前5次吗?
## Sort the dataframe by Date and keep only the earliest appearance of 'Item1'
## drop_duplicates considers the column 'Date' and keeps only first occurence
coocdates = data.sort('Date').drop_duplicates(cols=['
在我的项目中,我使用kendo网格显示数据,在我的ActionResult中,我使用以下代码获取数据:
public ActionResult ShowData([DataSourceRequest] DataSourceRequest request, long studentid)
{
IQueryable<Models.Registration.RegistrationModel>
query =
from financeItem in db.RegistrationItems
select new Models.Re