Comments (6)
I have the same issue when the foreign-key in a model is a string. Any workaround for this?
from django-pandas.
I worked around it by specifying the cols.
from django-pandas.
I have face similar issue
invalid literal for int() with base 10: 'bk-dw-02'
Specifying of columns doesn't help me either.
qs = GwMonitoringKobo.objects.all()
df = read_frame(qs, fieldnames=['date', 'district', 'latitude','longitude','altitude','precision','well_type','measurement_point_cm', 'measurement_of_wet_point_on_tape_in_m_field',
'gw_level_from_mp','mp_in_m','gw_level', 'fid','well_num'])
from django-pandas.
why I am ok??
I am configuration:
Django 2.2
numpy 1.21.5
pandas 1.3.5
pip 21.1.2
python-dateutil 2.8.2
pytz 2021.3
semver 2.13.0
setuptools 57.0.0
six 1.16.0
sqlparse 0.4.2
wheel 0.36.2
from django-pandas.
Can you tell why you have set your entity relationship as
class Testing1(models.Model):
symbol = models.CharField('Ticker', max_length=32, primary_key=True)
tf = models.CharField('timeframe', max_length=1)
class Testing2(models.Model):
symbol = models.ForeignKey(Testing1, on_delete=models.CASCADE)
price = models.CharField('price', max_length=1)
When I setup the models I use Model Class as Foreign key, for instance
class Testing1(models.Model):
symbol = models.CharField('Ticker', max_length=32, primary_key=True)
tf = models.CharField('timeframe', max_length=1)
class Testing2(models.Model):
Testing1 = models.ForeignKey(Testing1, on_delete=models.CASCADE, related_name='Testing1Symbols')
price = models.CharField('price', max_length=1)
from django-pandas.
Why would you code it this way? Never seen this type of model / ForeignKey relationship. It's not logical.
from django-pandas.
Related Issues (20)
- verbose does not return Foreign Key object's name
- Cannot extend admin-tools blocks into new templates HOT 1
- Django 3.1: AttributeError: module 'django.db.models.fields' has no attribute 'FieldDoesNotExist' with annotation HOT 3
- Safely saving pandas DataFrame to SQL table via Django HOT 5
- read_frame bug: ForeignKey lookup fails if any Null values present HOT 2
- Possible to release latest dev version to PyPI? HOT 8
- Bug: `read_frame` does not work if at least one manager is not named "objects"
- How can I merge different tables on the basis of a foreign key?
- Converting django.models.DateField to datetime64 in read_frame
- test_io.RelatedFieldsTest.test_verbose: ValueError: cannot convert float NaN to integer HOT 6
- Race condition of queryset in read_frame HOT 3
- configure github actions (travis tests are no longer running) HOT 4
- run tests with warnings enabled HOT 1
- Stack Trace - ValueError: cannot convert float NaN to integer - When a foreign key is null HOT 4
- force_text removed in Django 4.0 HOT 2
- Bug with binary field and to_pivot_table HOT 2
- Data truncation
- read_frame breaks if fieldnames and column_names are passed and there is an FK reference in the fieldnames
- Pandas 2.1 has a deprecation warning for convert_dtype on read_frame HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-pandas.