Hi thanks for the lib! But it seems that I cannot have type List[str] in a series
A clear and concise description of what the bug is.
[x] I have checked that this issue has not already been reported.
[x] I have confirmed this bug exists on the latest version of pandera.
[ ] (optional) I have confirmed this bug exists on the master branch of pandera.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
# Your code here
from typing import List
import pandera as pa
from pandera.typing import Series, DataFrame
class MySchema(pa.SchemaModel):
# my_field: Series[str] = pa.Field()
my_field: Series[List[str]] = pa.Field()
df = DataFrame[MySchema](dict(
my_field=[
# [1]
['a']
]
))
print(df)
Expected behavior
A clear and concise description of what you expected to happen.
If use type List[str], it should only accept values when it is a list of str -- but currently it is not
If use type str, it should throw if the value is a list of str -- but currently it is not
Desktop (please complete the following information):
OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]
Screenshots
If applicable, add screenshots to help explain your problem.
hi @fzyzcjy this is pretty much captured in https://github.com/unionai-oss/pandera/issues/260, gonna close this issue out as a duplicate. Feel free to chime in at #260 and open up a PR if you're open to contribute!
Describe the bug
Hi thanks for the lib! But it seems that I cannot have type
List[str]
in a seriesA clear and concise description of what the bug is.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Expected behavior
A clear and concise description of what you expected to happen.
List[str]
, it should only accept values when it is a list of str -- but currently it is notstr
, it should throw if the value is a list of str -- but currently it is notDesktop (please complete the following information):
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.