Skip to content

Tag: python

How do I retrieve airflow url link to my latest task log in a DAG?

In individual DAG task, how do I set up the url link with the help from python operator as I am intending to send an url link of the latest log directly to the user whenever errors occur so that they can access to the page directly skipping the step of navigating. Answer You can define a callback function, wh…

Downsample non timeseries pandas dataframe

I have a data frame like below, I want to reduce the size of data frame by Depth_Feet column (let’s say every 2 feet). Desired output is I have tried few options like round and group by etc, but I’m not able to get the result I want. Answer If need each 2 rows per groups: If need resample by

how to install multiple packages in one line using conda?

I need to install below multiple packages using conda. I am not sure what is conda-forge? some uses conda-forge, some doesn’t use it. Is it possible to install them in one line without installing them one by one? Thanks Answer Why some packages have to be installed through conda forge: Conda official re…