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
site = models.ForeignKey(Site, on_delete=models.CASCADE)
name = models.CharField(max_length=100, )
start_date_time = models.DateTimeField(auto_now=False, auto_now_add=False, verbose_name='Date and time at which the well is deployed.')
with this serializer
class FileSerializer(serializers.ModelSerializer):
class Meta:
model = Well
fields = ('id', 'name', 'site', )
The resulting dataframe has a column start_date_time but this is a string rather than a datetime object. I work around this by using transform_dataframe and convert the column using pandas.to_datetime function. Is this the way to go or am I missing someting?
The text was updated successfully, but these errors were encountered:
When I serialize this model
with this serializer
The resulting dataframe has a column
start_date_time
but this is a string rather than a datetime object. I work around this by usingtransform_dataframe
and convert the column usingpandas.to_datetime
function. Is this the way to go or am I missing someting?The text was updated successfully, but these errors were encountered: