See my stackoverflow question here https://stackoverflow.com/questions/71550468/does-python-have-an-analogue-to-rs-splinesns
I am thinking that there is not current way to make this happen in patsy.
I am requesting a feature for a ns function much like the cr function, but where ns matches the behavior of R's splines::ns