首页 > 解决方案 > 当我尝试运行此代码时,出现以下错误:警告:QT_DEVICE_PIXEL_RATIO 已弃用。而是使用:

问题描述

import pandas as pd
from pandas import DataFrame
import matplotlib.pyplot as plt

data = pd.read_csv("cost_revenue_clean.csv")


X = DataFrame(data, columns = ['production_budget_usd'])
y = DataFrame(data, columns = ['worldwide_gross_usd'])

plt.scatter(X, y)
plt.show

我的错误:

Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.

标签: pythonpandasmatplotlib

解决方案


推荐阅读