Hi,
I have a query which ORs some selects on a single table together like this:
jurisdiction = 'aaa'
qs = Buss.objects.filter(jurisdiction=jurisdiction)
qs = qs | Buss.objects.filter(jurisdiction='xxx').exclude(name__in
=qs.values_list('name', flat=True))
qs = qs | Buss.objects.filter(jurisdictio
you may use pandas for this
you can use it as follows:-
first install it
if not using python from anaconda environment!
pip install pandas
import pandas as pd
reader=pd.read_csv("sample-dataset.csv")
reader.head(3) # for viewing top 3 rows.
hope this may help you
-)-)
On Thursday, 29 April 2021
Typically you would write a custom management command for this kind of thing:
https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/
On April 29, 2021 11:05:29 AM CDT, 'Muhammad Asim Khaskheli' via Django users
wrote:
>
>Hi,
>
>I wanted to ask how to load CSV data into the mode
Hi,
I wanted to ask how to load CSV data into the model. What steps do we have
to follow?
I have made this function but how exactly to run this code because, python
manage.py load data won't work.
def import_data():
with open('sample-dataset.csv') as f:
reader = csv.reader(f)
for row in read
I am knew to Django
I am getting below warning
unresolved import 'django.contrib'
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@go
5 matches
Mail list logo