python数据分析的代码
```python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('ftx_xian2.csv', encoding='gbk')
df_duplicates = df.drop_duplicates(subset='title', keep='first')
df_clean = df_duplicates[
['housetype', 'floor', 'orientation', 'yearbuilt', 'Street', 'area', 'unitprice']]
print(df_clean['unitprice'])
df_clean.head()
df_clean.yearbuilt.value_counts()
plt.style.use('ggplot')
df_clean.yearbuilt.hist()
df_clean.boxplot(column='unitprice',by='yearbuilt')
plt.show()
print(len(df.title.unique()))