Top "Top-n" questions

Oracle SELECT TOP 10 records

I have an big problem with an SQL Statement in Oracle. I want to select the TOP 10 Records ordered by …

sql oracle top-n
Pandas get topmost n records within each group

Suppose I have pandas DataFrame like this: >>> df = pd.DataFrame({'id':[1,1,1,2,2,2,2,3,4],'value':[1,2,3,1,2,3,4,1,1]}) >>> df id …

python pandas greatest-n-per-group window-functions top-n
How to get top n companies from a data frame in decreasing order

I am trying to get the top 'n' companies from a data frame.Here is my code below. data("Forbes2000", …

r sorting plyr top-n
Oracle SQL - How to Retrieve highest 5 values of a column

How do you write a query where only a select number of rows are returned with either the highest or …

sql oracle top-n
Oracle SQL query: Retrieve latest values per group based on time

I have the following table in an Oracle DB id date quantity 1 2010-01-04 11:00 152 2 2010-01-04 11:00 210 1 2010-01-04 10:45 132 2 2010-01-04 10:45 318 4 2010…

sql oracle greatest-n-per-group top-n
In MariaDB how do I select the top 10 rows from a table?

I just read online that MariaDB (which SQLZoo uses), is based on MySQL. So I thought that I can use …

mysql sql select mariadb top-n
SUM of only TOP 10 rows

I have a query where I am only selecting the TOP 10 rows, but I have a SUM function in there …

sql sum top-n
How to see top n entries of term-document matrix after tfidf in scikit-learn

I am new to scikit-learn, and I was using TfidfVectorizer to find the tfidf values of terms in a set …

python numpy scikit-learn tf-idf top-n
Evaluation & Calculate Top-N Accuracy: Top 1 and Top 5

I have come across few (Machine learning-classification problem) journal papers mentioned about evaluate accuracy with Top-N approach. Data was show …

algorithm machine-learning evaluation top-n
Top N items from a Spark DataFrame/RDD

My requirement is to get the top N items from a dataframe. I've this DataFrame: val df = List( ("MA", "USA"), ("…

scala apache-spark top-n