Files
openide/python/python-psi-impl/resources/inspectionDescriptions/PyPandasSeriesToListInspection.html
Natalia.Murycheva 0d53aa47df DS-4878 Pandas-specific-quick-fix-replace-listdf.col.values-to-df.col.tolist
Add new intention and a corresponding quick fix for the usage pd.Series.values property from pandas library.

^DS-4878 Fixed

Merge-request: IJ-MR-106089
Merged-by: Natalia Murycheva <natalia.murycheva@jetbrains.com>

GitOrigin-RevId: 0c8dc40b09ee2d95ecd8ded532f31f5ef4a7740f
2023-05-13 20:44:29 +00:00

14 lines
478 B
HTML

<html>
<body>
<p>Reports redundant <code>list</code> in <code>list(Series.values)</code> statement for pandas and polars libraries.
Such <code>Series</code> values extraction can be replaced with the <code>to_list()</code> function call.</p>
<p><b>Example:</b></p>
<pre style="font-family: monospace">
list(df['column'].values)
</pre>
<p>When the quick-fix is applied, the code changes to:</p>
<pre style="font-family: monospace">
df['column'].to_list()
</pre>
</body>
</html>