You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By design, no advanced filtering is intended at this step.
However, if your file is too big to fit into memory and you need more advanced filtering,
you can provide your custom import function to the low-level load_storage_object magic:
defyour_function(f):
return [
linefori, lineinenumerate(f)
ifi%2==0# replace with fancy filtering as needed
]
%vaultimport'notebook_path/variable.tsv'asvariablewithyour_function
The advanced filtering can be already achieved with existing code.
Simple filtering proposal - idea 1
To enable high-performance subsetting a simple, grip-like pre-filtering will be provided:Import only first five rows:
When subsetting, the use of
as
would be required to prevent potential confusion of the originallarge_frame
object with its subset.To import only rows including text "SNP":
However, if your file is too big to fit into memory and you need more advanced filtering,
you can provide your custom import function to the low-level
load_storage_object
magic:The advanced filtering can be already achieved with existing code.
Simple filtering proposal - idea 2
Import the first 5 rows:
to be implemented with
nrows
Import the first 5 columns:
to be implemented with
usecols
Import rows containig a string:
Import rows matching a regular expression:
both to be implemented with a custom IO iterator which discards lines which do not match the criteria on the fly.
Challenges:
subset.using(sep='csv').rows[:5]
?The text was updated successfully, but these errors were encountered: