Comments (3)
This is another bug where Lux isn't supporting CategoricalDtype. Specifically, both cut
and qcut
output a column of CategoricalDtype.
import pandas as pd
import numpy as np
import lux
url = 'https://github.com/lux-org/lux-datasets/blob/master/data/cars.csv?raw=true'
df = pd.read_csv(url)
df['Year'] = pd.to_datetime(df['Year'], format='%Y')
df["Weight"] = pd.qcut(df["Weight"], q = 3)
import pandas as pd
import numpy as np
import lux
url = 'https://github.com/lux-org/lux-datasets/blob/master/data/cars.csv?raw=true'
df = pd.read_csv(url)
df['Year'] = pd.to_datetime(df['Year'], format='%Y')
df["Weight"] = pd.cut(df["Weight"], bins = [0, 2500, 7500, 10000], labels = ["small", "medium", "large"])
Both code blocks have the same error:
from lux.
Another bug for Category dtype is for this example:
import pandas as pd
import numpy as np
import lux
url = 'https://github.com/lux-org/lux-datasets/blob/master/data/cars.csv?raw=true'
df = pd.read_csv(url)
df['Year'] = pd.to_datetime(df['Year'], format='%Y')
new_df = df.drop([0, 1, 2], axis = "rows")
pd.merge(df, new_df, how = "left", indicator = True)
The indicator
argument creates a column of dtype category
called _merge
, resulting in this bug:
This happens because Lux can't handle category
dtype, so it doesn't assign it a data type.
from lux.
This is resolved with @westernguy2's new PRs!
from lux.
Related Issues (20)
- [BUG] HOT 1
- AttributeError: 'LuxDataFrame' object has no attribute '_type_override'
- [BUG] IndexError: index 0 is out of bounds for axis 0 with size 0
- Redundant data in timeseries analysis
- [BUG] ModuleNotFoundError: No module named 'fcntl' HOT 10
- ModuleNotFoundError: No module named 'termios'
- C:\Users\mukta\anaconda3\lib\site-packages\IPython\core\formatters.py:918: UserWarning: Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display.
- [BUG] Couldnt see visualizations
- [BUG]
- Issue/error on rendering dataframe using LUX
- Lux cannot import 'bmat' from SciPy
- [BUG] New pandas versions seem to break Vis aggregation HOT 2
- [Feature Request] Lux should also be extensible to make it easy for external libraries with pandas API to support.
- Can I put lux into Shiny web application (shiny for python)?
- [Feature Request] Reproducible builds
- [BUG] Current Version of The-Littlest-Jupyter-Hub not Supported
- [BUG]
- [BUG] Exporting to Streamlit
- [BUG]Failed to load model class 'LuxModel' from module 'luxwidget' HOT 1
- [BUG] Everything goes well but no 'Toggle Pandas/Lux' bottom HOT 1
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 lux.