vaexio / vaex

Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀
https://vaex.io
MIT License
8.22k stars 589 forks source link

How do i overcome this issue? #2406

Open shivanesh31 opened 6 months ago

shivanesh31 commented 6 months ago

df_vaex['CARRIER_NAME'] = df_vaex.astype('category') df.plot1d(df['CARRIER_NAME'], shape=128, limits='99.7%') plt.title('Number of Flights by Carrier') plt.xlabel('Carrier Name') plt.ylabel('Number of Flights') plt.xticks(rotation=45, ha='right') plt.show()

AttributeError: 'DataFrameLocal' object has no attribute 'astype'

ashsharma96 commented 6 months ago

@shivanesh31 Maybe the below change can help you on this!

df_vaex['CARRIER_NAME'] = df_vaex['CARRIER_NAME'].astype('category')