Comments (2)
Hello, I specially reappear your problem. I find that it should be the aggfunc
parameter of to_pivot_table
method. The default aggfunc
is set to mean
, so your results cannot be output. The following can correct your problem.
gs.to_pivot_table(values='marks', rows='student', cols='subject', aggfunc='sum')
output is:
.subject Math Science
student
Ameliee b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00... b'concha'
Jacob b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00... b'ram\xc3\xb3n'
and you can also keep your marks
filed type is BinaryField
I hope it helps~~<( ̄▽ ̄)/
from django-pandas.
It worked! Thanks!
from django-pandas.
Related Issues (20)
- 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?
- error if primary_key is not int() HOT 6
- 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
- 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
- Feature proposal: Allow providing dicts to fieldnames for downstream renaming
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.