Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

subset

jq: selecting a subset of keys from an object

September 7, 2023 by Tarik

solution with inside check: jq ‘with_entries(select([.key] | inside([“key1”, “key2”])))’

Categories json Tags jq, json, key, select, subset Leave a comment

How to remove rows of a matrix by row name, rather than numerical index?

September 6, 2023 by Tarik
Categories r Tags matrix, r, r-rownames, subset Leave a comment

Subset a dataframe between 2 dates

September 1, 2023 by Tarik
Categories r Tags date, r, subset Leave a comment

how to remove multiple columns in r dataframe?

August 26, 2023 by Tarik
Categories r Tags dataframe, r, subset Leave a comment

Apply function on a subset of columns (.SDcols) whilst applying a different function on another column (within groups)

August 25, 2023 by Tarik
Categories r Tags data.table, lapply, r, subset Leave a comment

Subset data frame based on number of rows per group

August 19, 2023 by Tarik
Categories r Tags dataframe, r, r-faq, subset Leave a comment

Subset dataframe by multiple logical conditions of rows to remove

August 11, 2023 by Tarik
Categories r Tags dataframe, r, subset Leave a comment

Find all subsets of length k in an array

August 8, 2023 by Tarik

Recursion is your friend for this task. For each element – “guess” if it is in the current subset, and recursively invoke with the guess and a smaller superset you can select from. Doing so for both the “yes” and “no” guesses – will result in all possible subsets. Restraining yourself to a certain length … Read more

Categories arrays Tags algorithm, arrays, powerset, subset Leave a comment

How to select some rows with specific rownames from a dataframe? [closed]

August 7, 2023 by Tarik
Categories r Tags dataframe, r, subset Leave a comment

creating a new list with subset of list using index in python

August 6, 2023 by Tarik

Suppose a = [‘a’, ‘b’, ‘c’, 3, 4, ‘d’, 6, 7, 8] and the list of indexes is stored in b= [0, 1, 2, 4, 6, 7, 8] then a simple one-line solution will be c = [a[i] for i in b]

Categories python Tags indexing, list, python, subset Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page6 Next →

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa